|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweiss.util.AbstractCollection<AnyType>
public abstract class AbstractCollection<AnyType>
AbstractCollection provides default implementations for some of the easy methods in the Collection interface.
Constructor Summary | |
---|---|
AbstractCollection()
|
Method Summary | ||
---|---|---|
boolean |
add(AnyType x)
Adds x to this collections. |
|
void |
clear()
Change the size of this collection to zero. |
|
boolean |
contains(java.lang.Object x)
Returns true if this collection contains x. |
|
boolean |
equals(java.lang.Object other)
Return true if items in other collection are equal to items in this collection (same order, and same according to equals). |
|
int |
hashCode()
Return the hashCode. |
|
boolean |
isEmpty()
Tests if this collection is empty. |
|
boolean |
remove(java.lang.Object x)
Removes non-null x from this collection. |
|
java.lang.Object[] |
toArray()
Obtains a primitive array view of the collection. |
|
|
toArray(OtherType[] arr)
Obtains a primitive array view of the collection. |
|
java.lang.String |
toString()
Return a string representation of this collection. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface weiss.util.Collection |
---|
iterator, size |
Constructor Detail |
---|
public AbstractCollection()
Method Detail |
---|
public boolean isEmpty()
isEmpty
in interface Collection<AnyType>
public void clear()
clear
in interface Collection<AnyType>
public java.lang.Object[] toArray()
toArray
in interface Collection<AnyType>
public <OtherType> OtherType[] toArray(OtherType[] arr)
Collection
toArray
in interface Collection<AnyType>
public boolean contains(java.lang.Object x)
contains
in interface Collection<AnyType>
x
- the item to search for.
public boolean add(AnyType x)
add
in interface Collection<AnyType>
x
- the item to add.
java.lang.UnsupportedOperationException
- always.public boolean remove(java.lang.Object x)
remove
in interface Collection<AnyType>
x
- the item to remove.
public final boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |