public abstract class AbstractFlowSet<T> extends java.lang.Object implements FlowSet<T>
public void yyy(FlowSet dest) { if (dest instanceof xxx) { blahblah; } else super.yyy(dest) }
Constructor and Description |
---|
AbstractFlowSet() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(T obj)
Adds
obj to this . |
void |
add(T obj,
FlowSet<T> dest)
puts
this union obj into dest . |
void |
clear()
implemented, but *very* inefficient.
|
abstract AbstractFlowSet<T> |
clone()
Clones the current FlowSet.
|
abstract boolean |
contains(T obj)
Returns true if this FlowSet contains
obj . |
void |
copy(FlowSet<T> dest)
Copies the current FlowSet into dest.
|
void |
difference(FlowSet<T> other)
Returns the set difference (this intersect ~other) of this FlowSet and
other , putting result into this . |
void |
difference(FlowSet<T> other,
FlowSet<T> dest)
Returns the set difference (this intersect ~other) of this FlowSet and
other , putting result into dest . |
FlowSet<T> |
emptySet()
implemented, but inefficient.
|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
void |
intersection(FlowSet<T> other)
Returns the intersection (meet) of this FlowSet and
other ,
putting result into this . |
void |
intersection(FlowSet<T> other,
FlowSet<T> dest)
Returns the intersection (meet) of this FlowSet and
other ,
putting result into dest . |
abstract boolean |
isEmpty()
Returns true if this FlowSet is the empty set.
|
boolean |
isSubSet(FlowSet<T> other)
Returns true if the
other FlowSet is a subset of this FlowSet. |
abstract java.util.Iterator<T> |
iterator()
returns an iterator over the elements of the flowSet.
|
abstract void |
remove(T obj)
Removes
obj from this . |
void |
remove(T obj,
FlowSet<T> dest)
Puts
this minus obj into dest . |
abstract int |
size()
Returns the size of the current FlowSet.
|
abstract java.util.List<T> |
toList()
Returns an unbacked list of contained objects for this FlowSet.
|
java.lang.String |
toString() |
void |
union(FlowSet<T> other)
Returns the union (join) of this FlowSet and
other , putting
result into this . |
void |
union(FlowSet<T> other,
FlowSet<T> dest)
Returns the union (join) of this FlowSet and
other , putting
result into dest . |
public abstract AbstractFlowSet<T> clone()
FlowSet
public void copy(FlowSet<T> dest)
FlowSet
public void clear()
public void union(FlowSet<T> other)
FlowSet
other
, putting
result into this
.public void union(FlowSet<T> other, FlowSet<T> dest)
FlowSet
other
, putting
result into dest
. dest
, other
and
this
could be the same object.public void intersection(FlowSet<T> other)
FlowSet
other
,
putting result into this
.intersection
in interface FlowSet<T>
public void intersection(FlowSet<T> other, FlowSet<T> dest)
FlowSet
other
,
putting result into dest
. dest
,
other
and this
could be the same object.intersection
in interface FlowSet<T>
public void difference(FlowSet<T> other)
FlowSet
other
, putting result into this
.difference
in interface FlowSet<T>
public void difference(FlowSet<T> other, FlowSet<T> dest)
FlowSet
other
, putting result into dest
.
dest
, other
and this
could be the
same object.difference
in interface FlowSet<T>
public abstract boolean isEmpty()
FlowSet
public abstract int size()
FlowSet
public void add(T obj, FlowSet<T> dest)
FlowSet
this
union obj
into dest
.public abstract void remove(T obj)
FlowSet
obj
from this
.public void remove(T obj, FlowSet<T> dest)
FlowSet
this
minus obj
into dest
.public boolean isSubSet(FlowSet<T> other)
FlowSet
other
FlowSet is a subset of this
FlowSet.public abstract boolean contains(T obj)
FlowSet
obj
.public abstract java.util.Iterator<T> iterator()
FlowSet
toList().iterator()
.public abstract java.util.List<T> toList()
FlowSet
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object