org.vizzini.util
Class AbstractList

java.lang.Object
  extended by org.vizzini.util.AbstractCollection
      extended by org.vizzini.util.AbstractList
All Implemented Interfaces:
Serializable, Iterable, Collection, ICollection
Direct Known Subclasses:
ActionCollection

public abstract class AbstractList
extends AbstractCollection

Provides base functionality for lists in the game framework.

Since:
v0.1
Version:
v0.1
Author:
Jeffrey M. Thompson
See Also:
Serialized Form

Constructor Summary
AbstractList()
           
 
Method Summary
 boolean add(Object object)
          Add the given object.
 void clear()
          Removes all of the objects from this collection.
 boolean contains(Object object)
          Returns true if this collection contains the given object.
 boolean equals(Object object)
          Return true if the given object is equal to this.
protected abstract  List getData()
          Return the data collection.
 int hashCode()
          Returns a hash code value for the object.
 boolean isEmpty()
          Return true if this is empty.
 Iterator iterator()
          Return an iterator over the collection.
 boolean remove(Object object)
          Removes a single instance of the given object from this collection, if it is present.
 int size()
          Return the size of this collection.
 
Methods inherited from class org.vizzini.util.AbstractCollection
addAll, containsAll, getType, removeAll, retainAll, toArray, toArray, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractList

public AbstractList()
Method Detail

isEmpty

public boolean isEmpty()
Return true if this is empty.

Since:
v0.1

add

public boolean add(Object object)
Add the given object.

Since:
v0.1

clear

public void clear()
Removes all of the objects from this collection.

Since:
v0.1

contains

public boolean contains(Object object)
Returns true if this collection contains the given object.

Since:
v0.1

equals

public boolean equals(Object object)
Return true if the given object is equal to this.

Specified by:
equals in interface Collection
Overrides:
equals in class Object
Parameters:
object - The object to compare.
Since:
v0.1

hashCode

public int hashCode()
Returns a hash code value for the object.

Specified by:
hashCode in interface Collection
Overrides:
hashCode in class Object
Since:
v0.1

iterator

public Iterator iterator()
Return an iterator over the collection.

Since:
v0.1

remove

public boolean remove(Object object)
Removes a single instance of the given object from this collection, if it is present.

Since:
v0.1

size

public int size()
Return the size of this collection.

Since:
v0.1

getData

protected abstract List getData()
Return the data collection.

Since:
v0.1


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02