com.objectwave.utility
Class OrderedVector
java.lang.Object
|
+--com.objectwave.utility.OrderedVector
- public class OrderedVector
- extends java.lang.Object
This is a vector implementation that stores the objects in an ordered way.
Access to objects can be in logrithmic time.
- Version:
- 1.3
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OrderedVector
public OrderedVector()
OrderedVector
public OrderedVector(int n)
get
public java.lang.Object get(java.lang.Object obj)
- Get may seem like an odd function...I mean, if you have the object for the get
param, I shouldn't need to get the object. But wait...If I have a custom
comparisonIF object, than the objec as the parameter may be a different instance
than the one in the Vector.
addElement
public void addElement(java.lang.Object value)
capacity
public int capacity()
- Returns:
- int
clear
public void clear()
contains
public boolean contains(java.lang.Object value)
- Return true if object is in collection.
elements
public java.util.Enumeration elements()
ensureCapacity
public void ensureCapacity(int minCapacity)
- Parameters:
minCapacity
- int
getComparison
public SorterComparisonIF getComparison()
- Returns:
- com.objectwave.utility.SorterComparisonIF
elementAt
public java.lang.Object elementAt(int idx)
indexOf
public int indexOf(java.lang.Object value)
main
public static void main(java.lang.String[] args)
remove
public java.lang.Object remove(java.lang.Object value)
removeElement
public boolean removeElement(java.lang.Object value)
setComparison
public void setComparison(SorterComparisonIF newValue)
- Parameters:
newValue
- com.objectwave.utility.SorterComparisonIF
size
public int size()
toVector
public java.util.Vector toVector()
trimToSize
public void trimToSize()