public class CollisionResponseList extends ComponentList<CollisionResponse>
CompositeComponent.NavpanelDisplay
ModelComponent.NavpanelVisibility
DEFAULT_NAVPANEL_DISPLAY, myProps
enforceUniqueCompositeNames, enforceUniqueNames, myNumber, NULL_OBJ, useCompactPathNames
Constructor and Description |
---|
CollisionResponseList() |
CollisionResponseList(java.lang.String name,
java.lang.String shortName) |
Modifier and Type | Method and Description |
---|---|
boolean |
add(CollisionResponse behav)
Adds a component to this MutableCompositeComponent.
|
void |
addComponents(ModelComponent[] comps,
int[] indices,
int num)
Adds a set of components to this MutableCompositeComponent.
|
CollisionResponse |
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.
|
CollisionResponse |
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 CollisionResponseList()
public CollisionResponseList(java.lang.String name, java.lang.String shortName)
public boolean hasParameterizedType()
ParameterizedClass
hasParameterizedType
in interface ParameterizedClass
hasParameterizedType
in class ComponentList<CollisionResponse>
true
if this class utilizes a parameterized type.public boolean add(CollisionResponse behav)
ComponentList
add
in interface MutableCompositeComponent<CollisionResponse>
add
in interface java.util.Collection<CollisionResponse>
add
in class ComponentList<CollisionResponse>
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<CollisionResponse>
addComponents
in class ComponentList<CollisionResponse>
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<CollisionResponse>
remove
in interface java.util.Collection<CollisionResponse>
remove
in class ComponentList<CollisionResponse>
comp
- component to be addedpublic CollisionResponse remove(int idx)
remove
in class ComponentList<CollisionResponse>
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<CollisionResponse>
removeComponents
in class ComponentList<CollisionResponse>
comps
- components to be removedindices
- (optional) stores the indices of the removed componentsnum
- number of components to be removedpublic CollisionResponse 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<CollisionResponse>
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<CollisionResponse>