|
Generic Interpreter 0.9 Private API |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gi.Lexicon.Set
This class implements a
.Set
Field Summary | |
(package private) Object[] |
elements
The elements in this Set . |
private boolean |
exclude
The null exclusion indicator. |
(package private) int |
size
The size of this Set . |
Constructor Summary | |
(package private) |
Lexicon.Set(int capacity)
Constructs a Set with an initial capacity. |
Method Summary | |
(package private) boolean |
add(Lexicon.Set from,
int start)
Adds a Set of elements to this Set . |
(package private) boolean |
add(Object object)
Adds an element to this Set . |
(package private) boolean |
append(Object object)
Appends an element to this Set . |
(package private) boolean |
contains(Object object)
Indicates if an element occurs in this Set . |
String |
toString()
Returns a string representation of this Set . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Field Detail |
Object[] elements
The elements in this Set
.
private final boolean exclude
The null exclusion indicator. If true
, add
methods will not add null
to this Set
.
int size
The size of this Set
.
Constructor Detail |
Lexicon.Set(int capacity)
Constructs a Set
with an initial capacity.
capacity
- the initial capacity. The magnitude of capacity
is the initial capacity. The null exclusion indicator is set to true
if capacity
is negative.Method Detail |
boolean add(Lexicon.Set from, int start)
Adds a Set
of elements to this Set
. An element is not added if it occurs in this Set
or it is null
and the null exclusion indicator is true
. The capacity is expanded if necessary.
from
- the Set
to be added.start
- the index in from
beyond which elements are added.true
if this Set
is changed; false
otherwise.boolean add(Object object)
Adds an element to this Set
. The element is not added if it occurs in this Set
or it is null
and the null exclusion indicator is true
. The capacity is expanded if necessary.
object
- the element to be added.true
if this Set
is changed; false
otherwise.boolean append(Object object)
Appends an element to this Set
. The element is always appended, without regard for the null exclusion indicator or whether it occurs in this Set
. The capacity is expanded by 50% if necessary.
object
- the element to be appended.true
since this Set
is changed.boolean contains(Object object)
Indicates if an element occurs in this Set
.
object
- the element whose membership if requested.true
if object
occurs in this Set
; false
otherwise.public String toString()
Returns a string representation of this Set
.
toString
in class Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |