public class ArraySparseSet extends AbstractFlowSet
| Modifier and Type | Field and Description |
|---|---|
protected static int |
DEFAULT_SIZE |
protected java.lang.Object[] |
elements |
protected int |
maxElements |
protected int |
numElements |
| Constructor and Description |
|---|
ArraySparseSet() |
| Modifier and Type | Method and Description |
|---|---|
void |
add(java.lang.Object e)
Adds
obj to this. |
void |
clear()
implemented, but *very* inefficient.
|
ArraySparseSet |
clone()
Clones the current FlowSet.
|
boolean |
contains(java.lang.Object obj)
Deprecated.
This method uses linear-time lookup.
For better performance, consider using a
HashSet instead, if you require this operation. |
void |
copy(FlowSet destFlow)
Copies the current FlowSet into dest.
|
void |
difference(FlowSet otherFlow,
FlowSet destFlow)
Returns the set difference (this intersect ~other) of this FlowSet and
other, putting result into dest. |
java.lang.Object |
emptySet()
implemented, but inefficient.
|
boolean |
equals(java.lang.Object otherFlow) |
void |
intersection(FlowSet otherFlow,
FlowSet destFlow)
Returns the intersection (meet) of this FlowSet and
other,
putting result into dest. |
boolean |
isEmpty()
Returns true if this FlowSet is the empty set.
|
void |
remove(java.lang.Object obj)
Removes
obj from this. |
int |
size()
Returns the size of the current FlowSet.
|
java.util.List |
toList()
Returns a unbacked list of elements in this set.
|
void |
union(FlowSet otherFlow,
FlowSet destFlow)
Returns the union (join) of this FlowSet and
other, putting
result into dest. |
add, difference, hashCode, intersection, iterator, remove, toString, unionprotected static final int DEFAULT_SIZE
protected int numElements
protected int maxElements
protected java.lang.Object[] elements
public ArraySparseSet clone()
FlowSetclone in interface FlowSetclone in class AbstractFlowSetpublic java.lang.Object emptySet()
AbstractFlowSetemptySet in interface FlowSetemptySet in class AbstractFlowSetpublic void clear()
AbstractFlowSetclear in interface FlowSetclear in class AbstractFlowSetpublic int size()
FlowSetsize in interface FlowSetsize in class AbstractFlowSetpublic boolean isEmpty()
FlowSetisEmpty in interface FlowSetisEmpty in class AbstractFlowSetpublic java.util.List toList()
toList in interface FlowSettoList in class AbstractFlowSetpublic void add(java.lang.Object e)
FlowSetobj to this.add in interface FlowSetadd in class AbstractFlowSetpublic void remove(java.lang.Object obj)
FlowSetobj from this.remove in interface FlowSetremove in class AbstractFlowSetpublic void union(FlowSet otherFlow, FlowSet destFlow)
FlowSetother, putting
result into dest. dest, other and
this could be the same object.union in interface FlowSetunion in class AbstractFlowSetpublic void intersection(FlowSet otherFlow, FlowSet destFlow)
FlowSetother,
putting result into dest. dest,
other and this could be the same object.intersection in interface FlowSetintersection in class AbstractFlowSetpublic void difference(FlowSet otherFlow, FlowSet destFlow)
FlowSetother, putting result into dest.
dest, other and this could be the
same object.difference in interface FlowSetdifference in class AbstractFlowSetpublic boolean contains(java.lang.Object obj)
HashSet instead, if you require this operation.FlowSetobj.contains in interface FlowSetcontains in class AbstractFlowSetpublic boolean equals(java.lang.Object otherFlow)
equals in class AbstractFlowSetCopyright © 2012-2019 RoboVM AB. All Rights Reserved.