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
public class SavotSet<E> extends java.lang.ObjectGeneric class for other set classes
- Author:
- Andre Schaaff
- See Also:
SavotSet
-
-
Constructor Summary
Constructors Constructor Description SavotSet()Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddItem(E item)Add an item to the setvoidensureCapacity(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.EgetItemAt(int index)Get an item at a given position (index)intgetItemCount()Get the number of itemsjava.util.List<E>getItems()Get the whole setvoidremoveAllItems()Remove all itemsvoidremoveItemAt(int index)Remove an item at a given position (index)voidsetItems(java.util.ArrayList<E> set)Set the whole set to a given setvoidtrim()Trims the capacity of this SavotSet instance to be the list's current size.
-
-
-
Method Detail
-
addItem
public final void addItem(E item)
Add an item to the set- Parameters:
item-
-
getItemAt
public final E getItemAt(int index)
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
public final void setItems(java.util.ArrayList<E> set)
Set the whole set to a given set- Parameters:
set-
-
getItems
public final java.util.List<E> 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.
-
-