|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractList<E> java.util.Vector<E> java.util.Stack<T> net.sf.sail.common.persistance.memory.MemorySock<T>
public class MemorySock<T>
Nested Class Summary | |
---|---|
class |
MemorySock.MemorySockEntry
|
Field Summary |
---|
Fields inherited from class java.util.Vector |
---|
capacityIncrement, elementCount, elementData |
Fields inherited from class java.util.AbstractList |
---|
modCount |
Constructor Summary | |
---|---|
MemorySock(Rim<T> rim)
|
Method Summary | |
---|---|
boolean |
add(T o)
The same as add(T o, false). |
boolean |
add(T o,
boolean replace)
Ensures that this collection contains the specified element (optional operation). |
java.util.Iterator<ISockEntry<T>> |
entryIterator()
FIXME this isn't really implemented |
ISockEntry<T> |
entryPeek()
Return the most recent ISockEntry in this sock. |
java.lang.String |
toString()
|
Methods inherited from class java.util.Stack |
---|
empty, peek, pop, push, search |
Methods inherited from class java.util.Vector |
---|
add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
---|
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface net.sf.sail.core.entity.ISock |
---|
isEmpty, iterator, peek, size |
Methods inherited from interface java.util.List |
---|
iterator, listIterator, listIterator |
Constructor Detail |
---|
public MemorySock(Rim<T> rim)
rim
- Method Detail |
---|
public boolean add(T o, boolean replace)
ISock
Collections that support this operation may place limitations on what elements may be added to this collection. In particular, some collections will refuse to add null elements, and others will impose restrictions on the type of elements that may be added. Collection classes should clearly specify in their documentation any restrictions on what elements may be added.
If a collection refuses to add a particular element for any reason other than that it already contains the element, it must throw an exception (rather than returning false). This preserves the invariant that a collection always contains the specified element after this call returns.
add
in interface ISock<T>
o
- element whose presence in this collection is to be ensured.replace
- false -- creates and adds a new SockEntry for this object
true -- replaces the timestamp and value of the most recent
SockEntry with the current timestamp and this object
public boolean add(T o)
ISock
add
in interface java.util.Collection<T>
add
in interface java.util.List<T>
add
in interface ISock<T>
add
in class java.util.Vector<T>
o
- element whose presence in this collection is to be ensured.
public java.lang.String toString()
toString
in class java.util.Vector<T>
public java.util.Iterator<ISockEntry<T>> entryIterator()
entryIterator
in interface ISock<T>
public ISockEntry<T> entryPeek()
ISock
entryPeek
in interface ISock<T>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |