|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpt.ua.base.Listable<T>
public abstract class Listable<T>
Generic listable list.
invariant: size() >= 0
invariant: isEmpty() <==> (size() == 0)
This class follows DbC(tm) methodology. Where possible, contracts are implement with JML and native's Java assert.
Constructor Summary | |
---|---|
Listable()
|
Method Summary | |
---|---|
abstract Listable<T> |
deepClone()
Clones current list. |
boolean |
isEmpty()
Queries the list emptiness. |
abstract boolean |
isFull()
Queries the list fullness. |
abstract boolean |
isLimited()
Checks if list is unbounded. |
abstract int |
maxSize()
The list maximum number of elements. |
abstract int |
size()
The list total number of elements. |
abstract Array<T> |
toArray()
Extracts all the elements of the list. |
abstract ImmutableList<T> |
toList()
Extracts all the elements of the list. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Listable()
Method Detail |
---|
public abstract int size()
public boolean isEmpty()
true
if list is empty, false
otherwisepublic abstract boolean isFull()
true
if list is full, false
otherwisepublic abstract boolean isLimited()
true
if list is unbounded, false
otherwisepublic abstract int maxSize()
requires: isLimited()
public abstract Listable<T> deepClone()
ensures: \result.size() == size()
public abstract ImmutableList<T> toList()
ensures: \result.size == size()
public abstract Array<T> toArray()
ensures: \result.size() == size()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |