cmu.survey.data
Class VectorDataSet<T extends HasBeenModified>
java.lang.Object
cmu.survey.data.VectorDataSet<T>
- All Implemented Interfaces:
- HasBeenModified, HasID
public class VectorDataSet<T extends HasBeenModified>
- extends java.lang.Object
- implements HasBeenModified, HasID
For storing a Vector of data that needs to be loaded and re-saved.
Has all the relevant data for saving to an arbitrary database, including unique ID, knowledge of whether the Vector has changed, and ability to know if it's components have changed.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
VectorDataSet
public VectorDataSet()
getSize
public int getSize()
get
public T get(int i)
add
public void add(T modifiable)
addToFront
public void addToFront(T modifiable)
remove
public boolean remove(T modifiable)
remove
public boolean remove(int index)
getHasBeenModified
public boolean getHasBeenModified()
- Specified by:
getHasBeenModified
in interface HasBeenModified
getListHasBeenModified
public boolean getListHasBeenModified()
setJustLoadedOrSaved
public void setJustLoadedOrSaved()
- Call this just after a load or save to let it know that it's no longer modified since the last save.
size
public int size()
isEmpty
public boolean isEmpty()
getID
public java.lang.Integer getID()
- Specified by:
getID
in interface HasID
- Returns:
- Returns the id.
setID
public void setID(java.lang.Integer id)
- Parameters:
id
- The id to set.
getDeletedItems
public java.util.Vector<T> getDeletedItems()