LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.data
Class LySimpleObjectList

java.lang.Object
  extended by leon.data.LyObjectList
      extended by leon.data.LySimpleObjectList

public final class LySimpleObjectList
extends LyObjectList

This class implements a writable list of objects.

These lists offer methods to add and remove objects.

This kind of list may allow multiple occurrences of the same object if this mode is chosen.


Field Summary
static java.lang.String __VERSION
          File version
 
Constructor Summary
LySimpleObjectList()
          Constructs an empty list with multiple occurrences not allowed.
LySimpleObjectList(boolean allowMultipleOccurences)
          Constructs a writable objects list with multiple occurrences allowed or not dependending on the given parameter.
LySimpleObjectList(LyObject object)
          Constructs a simple objects list with a single object.
LySimpleObjectList(LyObjectList list)
          Construct a simple objects list from an existing objects list.
LySimpleObjectList(LyObjectList list, boolean sameSort)
          Construct a simple objects list from an existing objects list.
 
Method Summary
 void addObject(LyObject object)
          Adds an object to this list.
 void addObject(LyObject object, int position)
          Adds an object to this list at a given position.
 LyInfoList<LyClassInfo> getClasses()
          Return the list of all class infos to which objects of this workspace belong.
 int getCount(LyClassInfo classInfo)
          Get count of objects for the given class info.
 int getCount(LyObject object)
          Gets the number of occurences count for the given object.
 void removeObject(LyObject object)
          Removes an object from this list.
 
Methods inherited from class leon.data.LyObjectList
addList, contains, delete, delete, equals, equals, getIndex, getIntersection, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getList, getObject, getObject, getObject, getObjects, getSize, getSize, getSort, getSortedList, indexOf, intersects, isDynamic, isEmpty, isSorted, iterator, reset, set, setSort, setSortByName, setSorted, toObjectIds, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

__VERSION

public static final java.lang.String __VERSION
File version

See Also:
Constant Field Values
Constructor Detail

LySimpleObjectList

public LySimpleObjectList()
Constructs an empty list with multiple occurrences not allowed.


LySimpleObjectList

public LySimpleObjectList(boolean allowMultipleOccurences)
Constructs a writable objects list with multiple occurrences allowed or not dependending on the given parameter.

Parameters:
allowMultipleOccurences - Boolean indicating if multiple occurences of the same object is allowed in this list.

LySimpleObjectList

public LySimpleObjectList(LyObject object)
Constructs a simple objects list with a single object. This new list doesn't allow multiple occurrences.

Parameters:
object - Object to add to the constructed list.

LySimpleObjectList

public LySimpleObjectList(LyObjectList list)
Construct a simple objects list from an existing objects list. This new list doesn't allow multiple occurrences.

Parameters:
list - Objects to add to the constructed list.

LySimpleObjectList

public LySimpleObjectList(LyObjectList list,
                          boolean sameSort)
Construct a simple objects list from an existing objects list. This new list doesn't allow multiple occurrences.

Parameters:
list - Objects to add to the constructed list.
sameSort - Boolean indicating if sort of the list parameter should be applied to the new list.
Method Detail

getClasses

public LyInfoList<LyClassInfo> getClasses()
Return the list of all class infos to which objects of this workspace belong.

Specified by:
getClasses in class LyObjectList
Returns:
List of classes to which objects of this workspace belong.

getCount

public int getCount(LyClassInfo classInfo)
Get count of objects for the given class info.

Parameters:
classInfo - Class info for which objects count is requested.
Returns:
Number of objects of the given class info found in this workspace.

addObject

public void addObject(LyObject object)
Adds an object to this list.

Parameters:
object - Object to add to this list.
Throws:
java.lang.IllegalArgumentException - If the given object is null or if the list alreday contains this object and doesn't allow multiple occurrences.

addObject

public void addObject(LyObject object,
                      int position)
Adds an object to this list at a given position.

Parameters:
object - Object to add to this list.
position - Position where the objects is added.
Throws:
java.lang.IllegalArgumentException - If the given object is null or if the list alreday contains this object and doesn't allow multiple occurrences.

removeObject

public void removeObject(LyObject object)
Removes an object from this list.

Parameters:
object - Object to remove from this list.
Throws:
java.lang.IllegalArgumentException - If the given object is null.

getCount

public int getCount(LyObject object)
Gets the number of occurences count for the given object.

Parameters:
object - the object
Returns:
Number of occurences of the given object in this list.

(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com