public class TLcyLayerSubsetList extends Object implements ILcyLayerSubsetList
ILcyLayerSubsetList
interface.Constructor and Description |
---|
TLcyLayerSubsetList() |
Modifier and Type | Method and Description |
---|---|
void |
addElement(Object aObject,
ILcdLayer aLayer)
Adds an
Object to the subset associated with the given ILcdLayer . |
ILcdAssoc[] |
asAssocs()
Retrieves an array of
ILcdAssoc . |
boolean |
contains(Object aObject)
Tests contains by comparing reference (not using Object.equals).
|
Enumeration |
elements()
Returns an
Enumeration of all the Objects in all the ILcdLayer
subsets. |
Enumeration |
layers()
Returns an
Enumeration of all ILcdLayer s in this list which are
associated with at least one Object . |
Enumeration |
layerSubset(ILcdLayer aLayer)
Returns an
Enumeration of all Objects currently in the subset associated with the
given ILcdLayer |
void |
removeAllElements()
Removes all the subsets.
|
void |
removeElement(Object aObject,
ILcdLayer aLayer)
Removes an
Object that was in the subset associated with the given
ILcdLayer . |
ILcdLayer |
retrieveLayer(Object aObject)
Returns the first
ILcdLayer encountered in this list that is associated with the
given Object . |
int |
size()
Returns the number of Objects in all the
ILcdLayer subsets. |
public void addElement(Object aObject, ILcdLayer aLayer)
ILcyLayerSubsetList
Object
to the subset associated with the given ILcdLayer
.
aObject
must belong to the ILcdModel
that aLayer refers to.addElement
in interface ILcyLayerSubsetList
aObject
- The Object
to add.aLayer
- The ILcdLayer
aObject
belongs to.public void removeElement(Object aObject, ILcdLayer aLayer)
ILcyLayerSubsetList
Object
that was in the subset associated with the given
ILcdLayer
.removeElement
in interface ILcyLayerSubsetList
aObject
- The Object
to remove.aLayer
- The ILcdLayer
aObject
belongs to.public Enumeration layers()
ILcyLayerSubsetList
Enumeration
of all ILcdLayer
s in this list which are
associated with at least one Object
.layers
in interface ILcyLayerSubsetList
Enumeration
of all ILcdLayer
s in this list which are
associated with at least one Object
.public Enumeration layerSubset(ILcdLayer aLayer)
ILcyLayerSubsetList
Enumeration
of all Objects currently in the subset associated with the
given ILcdLayer
layerSubset
in interface ILcyLayerSubsetList
Enumeration
of all Objects currently in the subset associated with the
given ILcdLayer
.public ILcdLayer retrieveLayer(Object aObject)
ILcyLayerSubsetList
ILcdLayer
encountered in this list that is associated with the
given Object
. Returns null
if aObject
is not
associated with any ILcdLayer
in this list.retrieveLayer
in interface ILcyLayerSubsetList
aObject
- The object for which the layer should be retrieved.ILcdLayer
associated with aObject
.public ILcdAssoc[] asAssocs()
ILcdAssoc
. For each ILcdAssoc
, the method
getKey()
returns an ILcdLayer
, the method getValue()
returns a Vector
containing the Objects part of the subset of this
ILcdLayer
.asAssocs
in interface ILcyLayerSubsetList
ILcdAssoc
objects associating the layers with their objects.public void removeAllElements()
ILcyLayerSubsetList
removeAllElements
in interface ILcyLayerSubsetList
public Enumeration elements()
ILcyLayerSubsetList
Enumeration
of all the Objects in all the ILcdLayer
subsets.elements
in interface ILcyLayerSubsetList
Enumeration
of all the Objects in all the ILcdLayer
subsets.public int size()
ILcyLayerSubsetList
ILcdLayer
subsets.size
in interface ILcyLayerSubsetList
ILcdLayer
subsets.public boolean contains(Object aObject)
contains
in interface ILcyLayerSubsetList
aObject
- The object whose presence in this list is to be tested.true
if the given Object
belongs to one of the
ILcdLayer
subsets, false otherwise.