Package cds.savot.model
Class SavotSet<E>
java.lang.Object
cds.savot.model.SavotSet<E>
- Type Parameters:
E- element type
- Direct Known Subclasses:
CoosysSet,DefinitionsSet,DescriptionSet,FieldRefSet,FieldSet,GroupSet,InfoSet,LinkSet,OptionSet,ParamRefSet,ParamSet,ResourceSet,TableSet,TDSet,TRSet
Generic class for other set classes
- Author:
- Andre Schaaff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal voidAdd an item to the setfinal voidensureCapacity(int minCapacity) Increases the capacity of this SavotSet instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.final EgetItemAt(int index) Get an item at a given position (index)final intGet the number of itemsgetItems()Get the whole setfinal voidRemove all itemsfinal voidremoveItemAt(int index) Remove an item at a given position (index)final voidSet the whole set to a given setfinal voidtrim()Trims the capacity of this SavotSet instance to be the list's current size.
-
Constructor Details
-
SavotSet
public SavotSet()Constructor
-
-
Method Details
-
addItem
Add an item to the set- Parameters:
item-
-
getItemAt
Get an item at a given position (index)- Parameters:
index-- Returns:
- Object
-
removeItemAt
public final void removeItemAt(int index) Remove an item at a given position (index)- Parameters:
index-
-
removeAllItems
public final void removeAllItems()Remove all items -
setItems
Set the whole set to a given set- Parameters:
set-
-
getItems
Get the whole set- Returns:
- a ArrayList
-
getItemCount
public final int getItemCount()Get the number of items- Returns:
- int
-
ensureCapacity
public final void ensureCapacity(int minCapacity) Increases the capacity of this SavotSet instance, if necessary, to ensure that it can hold at least the number of elements specified by the minimum capacity argument.- Parameters:
minCapacity- the desired minimum capacity
-
trim
public final void trim()Trims the capacity of this SavotSet instance to be the list's current size. An application can use this operation to minimize the storage of an SavotSet instance.
-