wordCluster
Class ComparableArray<T>

java.lang.Object
  extended by java.util.AbstractCollection<E>
      extended by java.util.AbstractList<E>
          extended by java.util.ArrayList<T>
              extended by wordCluster.ComparableArray<T>
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<T>, java.lang.Iterable<T>, java.util.Collection<T>, java.util.List<T>, java.util.RandomAccess

public class ComparableArray<T>
extends java.util.ArrayList<T>
implements java.lang.Comparable<T>

ComparableArray: an ArrayList than can be compared according to its size Author : Mario Jarmasz Created: October, 2003

Version:
1.2 Nov 2008
Author:
Mario Jarmasz and Alistsair Kennedy
See Also:
Serialized Form

Constructor Summary
ComparableArray()
          Constructor
ComparableArray(java.util.Collection<T> c)
          Constructor passed a Collection
 
Method Summary
 int compareTo(java.lang.Object other)
          Compares two ArrayList.
 HeadInfo getHeadInfo()
          get HeadInfo
 void setHeadInfo(HeadInfo hi)
          set HeadInfo
 
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, 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, removeAll, retainAll, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
containsAll, equals, hashCode, iterator, listIterator, listIterator, removeAll, retainAll, subList
 

Constructor Detail

ComparableArray

public ComparableArray()
Constructor


ComparableArray

public ComparableArray(java.util.Collection<T> c)
Constructor passed a Collection

Parameters:
c -
Method Detail

compareTo

public int compareTo(java.lang.Object other)
Compares two ArrayList. They are equal is they contain the same elements and are of the same size

Specified by:
compareTo in interface java.lang.Comparable<T>

setHeadInfo

public void setHeadInfo(HeadInfo hi)
set HeadInfo

Parameters:
hi -

getHeadInfo

public HeadInfo getHeadInfo()
get HeadInfo

Returns:
headInfo stored in the Comparable Array