org.rubato.rubettes.bigbang.model
Class BigBangObject
java.lang.Object
org.rubato.rubettes.bigbang.model.BigBangObject
- All Implemented Interfaces:
- java.lang.Comparable<BigBangObject>
public class BigBangObject
- extends java.lang.Object
- implements java.lang.Comparable<BigBangObject>
Every denotator that is either the top level denotator or an element of a powerset is represented by a
BigBangObject. This class keeps track of the path of its location as well as its values at every stage of the
composition, i.e. before every operation. It is used to bring the comfort of permanent identity known from object oriented programming to the
otherwise functional world of Rubato Composer.
- Author:
- florian thalmann
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
BigBangObject
public BigBangObject(AbstractOperation creatingOperation,
AbstractOperation initialOperation,
BigBangObject parent,
DenotatorPath topDenotatorPath,
BigBangLayer layer)
- Constructs a standard BigBangObject.
- Parameters:
creatingOperation
- the operation during which this object is createdinitialOperation
- the first operation this object exist atparent
- topDenotatorPath
-
setObjectType
public void setObjectType(DenotatorObjectConfiguration objectType)
getParent
public BigBangObject getParent()
getParentAt
public BigBangObject getParentAt(AbstractOperation operation)
addChild
public void addChild(AbstractOperation operation,
BigBangObject newChild)
hasChildren
public boolean hasChildren()
hasChildrenAt
public boolean hasChildrenAt(AbstractOperation operation)
removeChild
public void removeChild(AbstractOperation operation,
BigBangObject newChild)
removeAllChildren
public void removeAllChildren(AbstractOperation operation)
removeFromHierarchy
public void removeFromHierarchy()
- removes this object from all children sets it appears in
getChildrenAt
public java.util.Set<BigBangObject> getChildrenAt(AbstractOperation operation)
getChildren
public java.util.Set<BigBangObject> getChildren()
setColimitIndex
public void setColimitIndex(int index)
updateValues
public void updateValues()
addValues
public void addValues(java.util.List<java.lang.Double> values)
setStructuralIndices
public void setStructuralIndices(java.util.List<java.lang.Integer> indices)
updatePathAndParent
public void updatePathAndParent(AbstractOperation operation,
DenotatorPath entirePath,
BigBangObject parent)
getCurrentOccurrencesOfValueName
public int getCurrentOccurrencesOfValueName(java.lang.String valueName)
getValues
public java.util.List<java.lang.Double> getValues(java.lang.String valueName)
getNthValue
public java.lang.Double getNthValue(java.lang.String valueName,
int n)
- Returns:
- the nth value with the given name, n >= 0 like a normal index
getTopDenotatorPath
public DenotatorPath getTopDenotatorPath()
getTopDenotatorPathAt
public DenotatorPath getTopDenotatorPathAt(AbstractOperation operation)
getCreatingOperation
public AbstractOperation getCreatingOperation()
removeOperation
public void removeOperation(AbstractOperation operation)
setLayer
public void setLayer(BigBangLayer layer)
addLayer
public void addLayer(BigBangLayer layer)
isOnLayer
public boolean isOnLayer(int layerIndex)
isActive
public boolean isActive()
isVisible
public boolean isVisible()
isAudible
public boolean isAudible()
compareTo
public int compareTo(BigBangObject other)
- Specified by:
compareTo
in interface java.lang.Comparable<BigBangObject>
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object