public class CollisionBehaviorList extends ComponentList<CollisionBehavior>
CompositeComponent.NavpanelDisplay
ModelComponent.NavpanelVisibility
DEFAULT_NAVPANEL_DISPLAY, myProps
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
Constructor and Description |
---|
CollisionBehaviorList() |
CollisionBehaviorList(java.lang.String name,
java.lang.String shortName) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(CollisionBehavior behav)
Adds a component to this MutableCompositeComponent.
|
void |
addComponents(ModelComponent[] comps,
int[] indices,
int num)
Adds a set of components to this MutableCompositeComponent.
|
CollisionBehavior |
get(CollidablePair pair) |
boolean |
hasParameterizedType()
Queries whether this class explicitly utilizes a parameterized type.
|
void |
postscan(java.util.Deque<ScanToken> tokens,
CompositeComponent ancestor)
Performs any required post-scanning for this component.
|
CollisionBehavior |
remove(int idx) |
boolean |
remove(java.lang.Object comp)
Removes a component from this MutableCompositeComponent, returning true if the
componet was in fact found and removed.
|
void |
removeAll() |
void |
removeComponents(ModelComponent[] comps,
int[] indices,
int num)
Removes a set of components from this MutableCompositeComponent.
|
add, addAll, addFixed, addNumbered, clear, clone, componentChanged, contains, contains, containsAll, copy, ensureCapacity, findComponent, get, get, getAllPropertyInfo, getByNumber, getChildren, getNavpanelDisplay, getNumberLimit, getOneBasedNumbering, getParameterType, getShortName, hasChildren, hierarchyContainsReferences, indexOf, invalidateNumbers, isEditable, isEmpty, iterator, nextComponentNumber, numComponents, removeAll, resetNumbersToIndices, retainAll, scan, set, setEditable, setNavpanelDisplay, setNumbered, setOneBasedNumbering, setShortName, size, toArray, toArray, updateNameMap
checkFlag, checkName, checkNameUniqueness, clearFlag, connectToHierarchy, createTempFlag, disconnectFromHierarchy, getGrandParent, getHardReferences, getName, getNameRange, getNavpanelVisibility, getNavpanelVisibility, getNumber, getParent, getProperty, getSoftReferences, hasState, isFixed, isMarked, isScanning, isSelected, isWritable, makeValidName, makeValidName, notifyParentOfChange, printReferences, recursivelyContained, recursivelyContains, removeTempFlag, setFixed, setFlag, setMarked, setName, setNavpanelVisibility, setNavpanelVisibility, setNumber, setParent, setScanning, setSelected, setWritable, updateReferences, write
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
equals, hashCode, parallelStream, removeIf, spliterator, stream
connectToHierarchy, disconnectFromHierarchy, getHardReferences, getName, getNavpanelVisibility, getNumber, getParent, getSoftReferences, hasState, isFixed, isMarked, isSelected, notifyParentOfChange, setFixed, setMarked, setName, setNumber, setParent, setSelected, setWritable, updateReferences
getProperty
isWritable, write
public CollisionBehaviorList()
public CollisionBehaviorList(java.lang.String name, java.lang.String shortName)
public boolean hasParameterizedType()
ParameterizedClass
hasParameterizedType
in interface ParameterizedClass
hasParameterizedType
in class ComponentList<CollisionBehavior>
true
if this class utilizes a parameterized type.public boolean add(CollisionBehavior behav)
ComponentList
add
in interface MutableCompositeComponent<CollisionBehavior>
add
in interface java.util.Collection<CollisionBehavior>
add
in class ComponentList<CollisionBehavior>
behav
- component to be addetrue
if the component was actually addedpublic void addComponents(ModelComponent[] comps, int[] indices, int num)
ComponentList
indices
is not
null, it specified the index locations at which the components should be
added. It is up to the caller to insure that the specified index values
make sense; in particular, they must not exceed the final size of the
component and no two specified indices can be the same.addComponents
in interface MutableCompositeComponent<CollisionBehavior>
addComponents
in class ComponentList<CollisionBehavior>
comps
- list of components to be addedindices
- (optional) index locations of componentsnum
- number of components to be addedpublic boolean remove(java.lang.Object comp)
ComponentList
remove
in interface MutableCompositeComponent<CollisionBehavior>
remove
in interface java.util.Collection<CollisionBehavior>
remove
in class ComponentList<CollisionBehavior>
comp
- component to be addedpublic CollisionBehavior remove(int idx)
remove
in class ComponentList<CollisionBehavior>
public void removeComponents(ModelComponent[] comps, int[] indices, int num)
ComponentList
indices
is not
null, it is used to return the indices where the components were located.removeComponents
in interface MutableCompositeComponent<CollisionBehavior>
removeComponents
in class ComponentList<CollisionBehavior>
comps
- components to be removedindices
- (optional) stores the indices of the removed componentsnum
- number of components to be removedpublic CollisionBehavior get(CollidablePair pair)
public void postscan(java.util.Deque<ScanToken> tokens, CompositeComponent ancestor) throws java.io.IOException
PostScannable
scan()
method and stored in the token queue.
The most common use of this method is to resolve the paths
of component references, which may not have been created
at the time of the initial scan()
call.postscan
in interface PostScannable
postscan
in class ComponentList<CollisionBehavior>
tokens
- token information that was stored during
scan()
.ancestor
- ancestor component with respect to which
reference component paths are defined.java.io.IOException
- if an error is encountered (such as a reference to a
non-existent component)public void removeAll()
removeAll
in class ComponentList<CollisionBehavior>