|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.cometway.props.AbstractPropsContainer
com.cometway.props.VectorPropsContainer
public class VectorPropsContainer
This props container uses a Vector for indexable storage as a Props.
| Constructor Summary | |
|---|---|
VectorPropsContainer()
Creates a new instance with its own Vector for storage. |
|
VectorPropsContainer(java.util.Vector v)
Creates a new instance using the specified Vector for storage. |
|
| Method Summary | |
|---|---|
void |
copy(IPropsContainer ipc)
Copys the elements specified by enumerateProps() into the Props. |
java.util.Enumeration |
enumerateProps()
Returns a range of integer keys represented by the storage Vector. |
java.lang.Object |
getProperty(java.lang.String key)
Returns the Object specified by key. |
java.util.Vector |
getVector()
Returns the Vector used for storage. |
boolean |
removeProperty(java.lang.String key)
Removes the specified Object at the Vector index specified by key. |
void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets the specified Vector property. |
void |
setVector(java.util.Vector v)
Sets the Vector used for Props storage. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public VectorPropsContainer()
public VectorPropsContainer(java.util.Vector v)
| Method Detail |
|---|
public java.util.Vector getVector()
public java.lang.Object getProperty(java.lang.String key)
Returns the Object specified by key. If the key is Vector, the Vector used for storage is returned. If the key is size, the result of Vector.size() is returned. If the key is isEmpty, the result of Vector.isEmpty() is returned. If the key is capacity, the result of Vector.capacity() is returned. If the key is elements, the result of Vector.elements() is returned. If the key is firstElement, the result of Vector.firstElement() is returned. If the key is lastElement, the result of Vector.lastElement() is returned. If the key is an integer, the result of Vector.get(integer) is returned. Otherwise, null is returned.
key - the name of the object to retrieve.
public boolean removeProperty(java.lang.String key)
key - the name of the object to remove.
public void setProperty(java.lang.String key,
java.lang.Object value)
Sets the specified Vector property. If the key is Vector; the storage Vector is replaced by the value. If the key is size; the storage Vector is set to the specified size using Vector.setSize(). If the key is capacity; the storage Vector capacity is incresed using Vector.ensureCapacity(). If the key is add; the value is appended to the storage Vector using Vector.add(). If the key is an integer within the valid range of the Vector, the specified element is replaced by the value.
key - the name of the object to add or change.value - a reference to the new object.public void setVector(java.util.Vector v)
public void copy(IPropsContainer ipc)
ipc - the container to be copied into.public java.util.Enumeration enumerateProps()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||