edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer
Class ModifiedArrayList
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.ArrayList
|
+--edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.ModifiedArrayList
- public class ModifiedArrayList
- extends java.util.ArrayList
This class is an extention of an ArrayList that provides constant lookup time
by using a hashtable. It also provides convience methods to get the first and last objects and
return the statistics object
- See Also:
- Serialized Form
Fields inherited from class java.util.AbstractList |
modCount |
Method Summary |
boolean |
add(java.lang.Object o)
If the object can be added to the array list, then
add it, but store it in the hash table with the QueryObject
as the key and the StatisticsObject as the value. |
java.lang.Object |
getByIdentifier(int identifier)
Returns the object in the array who corresponds to the
given identifier. |
java.lang.Object |
getByIdentifier(int identifier,
boolean updateValues)
Returns the object in the array who corresponds to the
given identifier. |
java.lang.Object |
getFirst()
Insert the method's description here. |
java.lang.Object |
getLast()
Insert the method's description here. |
StatisticsObject |
getStatisticsObject(XATQueryObject queryObject)
Insert the method's description here. |
Methods inherited from class java.util.ArrayList |
add,
addAll,
addAll,
clear,
clone,
contains,
ensureCapacity,
get,
indexOf,
isEmpty,
lastIndexOf,
remove,
removeRange,
set,
size,
toArray,
toArray,
trimToSize |
Methods inherited from class java.util.AbstractList |
equals,
hashCode,
iterator,
listIterator,
listIterator,
subList |
Methods inherited from class java.util.AbstractCollection |
containsAll,
remove,
removeAll,
retainAll,
toString |
Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
ModifiedArrayList
public ModifiedArrayList()
- ModifiedArrayList constructor comment.
ModifiedArrayList
public ModifiedArrayList(int initialCapacity)
- ModifiedArrayList constructor comment.
- Parameters:
initialCapacity
- int
ModifiedArrayList
public ModifiedArrayList(java.util.Collection c)
- ModifiedArrayList constructor comment.
- Parameters:
c
- java.util.Collection
add
public boolean add(java.lang.Object o)
- If the object can be added to the array list, then
add it, but store it in the hash table with the QueryObject
as the key and the StatisticsObject as the value. This will
allow for quicker look up.
- Overrides:
- add in class java.util.ArrayList
- Parameters:
o
- java.lang.Object- Returns:
- boolean
getByIdentifier
public java.lang.Object getByIdentifier(int identifier)
- Returns the object in the array who corresponds to the
given identifier. The valid identifiers are found in StatisticsReference
- Parameters:
identifier
- int- Returns:
- java.lang.Object
getByIdentifier
public java.lang.Object getByIdentifier(int identifier,
boolean updateValues)
- Returns the object in the array who corresponds to the
given identifier. The valid identifiers are found in StatisticsReference
- Parameters:
identifier
- intupdateValues
- boolean true if the ModifiedArrayList should first update the statistitics, before
sorting and returning the value.- Returns:
- java.lang.Object
getFirst
public java.lang.Object getFirst()
- Insert the method's description here.
Creation date: (1/7/2003 6:01:42 PM)
- Returns:
- java.lang.Object
getLast
public java.lang.Object getLast()
- Insert the method's description here.
Creation date: (1/7/2003 6:02:03 PM)
- Returns:
- java.lang.Object
getStatisticsObject
public StatisticsObject getStatisticsObject(XATQueryObject queryObject)
- Insert the method's description here.
Creation date: (1/24/03 3:35:15 PM)
- Parameters:
queryObject
- edu.wpi.cs.dsrg.xmldb.xat.common.operator.XATQueryObject- Returns:
- edu.wpi.cs.dsrg.xmldb.xat.component.statisticsgatherer.StatisticsObject