ptolemy.actor.gt
Class GraphAnalyzer.IndexedList

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.AbstractSequentialList<E>
              extended by java.util.LinkedList<E>
                  extended by ptolemy.actor.gt.data.Tuple<java.lang.Object>
                      extended by ptolemy.actor.gt.data.Pair<java.util.List<?>,java.lang.Integer>
                          extended by ptolemy.actor.gt.GraphAnalyzer.IndexedList
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<java.lang.Object>, java.util.Collection<java.lang.Object>, java.util.List<java.lang.Object>, java.util.Queue<java.lang.Object>
Enclosing class:
GraphAnalyzer

public static class GraphAnalyzer.IndexedList
extends Pair<java.util.List<?>,java.lang.Integer>

A pair of a list and an index number.

Since:
Ptolemy II 7.1
Version:
$Id: GraphAnalyzer.java 57040 2010-01-27 20:52:32Z cxh $
Author:
Thomas Huining Feng
See Also:
Serialized Form
Accepted Rating:
Red (tfeng)
Proposed Rating:
Yellow (tfeng)

Field Summary
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
GraphAnalyzer.IndexedList(java.util.List<?> list, java.lang.Integer mark)
          Construct an IndexedList.
 
Method Summary
 boolean equals(java.lang.Object object)
          Test the equivalence between two IndexedLists.
 int hashCode()
          Return the hash code of the element in the list that the index points to.
 
Methods inherited from class ptolemy.actor.gt.data.Pair
getFirst, getSecond, set, setFirst, setSecond
 
Methods inherited from class java.util.LinkedList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, element, get, getLast, indexOf, lastIndexOf, listIterator, offer, peek, poll, remove, remove, remove, removeFirst, removeLast, set, size, toArray, toArray
 
Methods inherited from class java.util.AbstractSequentialList
iterator
 
Methods inherited from class java.util.AbstractList
listIterator, removeRange, subList
 
Methods inherited from class java.util.AbstractCollection
containsAll, isEmpty, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, isEmpty, iterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

GraphAnalyzer.IndexedList

GraphAnalyzer.IndexedList(java.util.List<?> list,
                          java.lang.Integer mark)
Construct an IndexedList.

Parameters:
list - The list.
mark - The index number.
Method Detail

equals

public boolean equals(java.lang.Object object)
Test the equivalence between two IndexedLists. They are equal if the elements in the lists that their indices point to are equal (by reference).

Specified by:
equals in interface java.util.Collection<java.lang.Object>
Specified by:
equals in interface java.util.List<java.lang.Object>
Overrides:
equals in class java.util.AbstractList<java.lang.Object>
Parameters:
object - The object to test.
Returns:
true if the object is an IndexedList and it is equal to this IndexedList; false otherwise.

hashCode

public int hashCode()
Return the hash code of the element in the list that the index points to.

Specified by:
hashCode in interface java.util.Collection<java.lang.Object>
Specified by:
hashCode in interface java.util.List<java.lang.Object>
Overrides:
hashCode in class java.util.AbstractList<java.lang.Object>
Returns:
The hash code.