net.sf.sail.common.persistance.memory
Class MemorySock

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.Vector<E>
              extended by java.util.Stack
                  extended by net.sf.sail.common.persistance.memory.MemorySock
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable, java.util.Collection, java.util.List, java.util.RandomAccess, ISock

public class MemorySock
extends java.util.Stack
implements ISock

See Also:
Serialized Form

Field Summary
(package private) static int sockCount
           
(package private)  int sockSerial
           
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
MemorySock(Rim rim)
           
 
Method Summary
 boolean add(java.lang.Object o)
          Ensures that this collection contains the specified element (optional operation).
 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
 

Field Detail

sockCount

static transient int sockCount

sockSerial

transient int sockSerial
Constructor Detail

MemorySock

public MemorySock(Rim rim)
Parameters:
rim -
Method Detail

add

public boolean add(java.lang.Object o)
Description copied from interface: ISock
Ensures that this collection contains the specified element (optional operation). Returns true if this collection changed as a result of the call. (Returns false if this collection does not permit duplicates and already contains the specified element.)

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.

Specified by:
add in interface java.util.Collection
Specified by:
add in interface java.util.List
Specified by:
add in interface ISock
Overrides:
add in class java.util.Vector
Parameters:
o - element whose presence in this collection is to be ensured.
Returns:
true if this collection changed as a result of the call

toString

public java.lang.String toString()
Overrides:
toString in class java.util.Vector


Copyright 2004-2004-2006 TELS Center. All Rights Reserved.