|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.util.AbstractCollection<E> java.util.AbstractSet blog.AbstractObjectSet blog.POPAppBasedSet
public class POPAppBasedSet
ObjectSet implementation that is composed of individual objects, plus all the objects that satisfy certain potential object pattern (POP) applications (number variables), with certain exceptional objects excluded.
Field Summary |
---|
Fields inherited from interface blog.ObjectSet |
---|
EMPTY_OBJECT_SET, UNDETERMINED_SET |
Constructor Summary | |
---|---|
POPAppBasedSet()
|
Method Summary | |
---|---|
void |
addIndividual(java.lang.Object indiv,
NumberVar popApp)
Adds the given individual to this set, asserting that the individual satisfies the POP application governed by the given number variable (or no POP application if the number variable is null). |
void |
addSatisfiers(NumberVar popApp,
ObjectSet satisfiers,
java.util.Set newExceptions)
Adds the given POP application satisfier set as a subset of this set, with the given exceptions. |
protected java.lang.Boolean |
containsInternal(java.lang.Object o)
Returns Boolean.TRUE if this set contains obj ,
Boolean.FALSE if this set does not contain obj , and null
if the underlying partial world is not complete enough to make the
distinction. |
ObjectSet |
getExplicitVersion()
Returns a version of this set that no longer reflects changes to the partial world or evaluation context. |
int |
indexOf(java.lang.Object o)
Returns the number which, when passed to sample ,
will yield the given element of this set. |
ObjectIterator |
iterator(java.util.Set externallyDistinguished)
Returns an ObjectIterator whose skipIndistinguishable
method treats all of the given objects as distinguishable from all
other objects, even if they are indistinguishable in the underlying
partial world. |
java.lang.Object |
sample(int n)
Returns an object sampled uniformly at random from this set, assuming that the given number n |
protected java.lang.Integer |
sizeInternal()
Returns the size of this set, or null if the underlying partial world is not complete enough to determine the size. |
java.lang.String |
toString()
|
Methods inherited from class blog.AbstractObjectSet |
---|
canDetermineContains, canDetermineElements, canDetermineIsEmpty, canDetermineSize, contains, isEmpty, isEmptyInternal, iterator, singleton, size |
Methods inherited from class java.util.AbstractSet |
---|
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
---|
add, addAll, clear, containsAll, remove, retainAll, toArray, toArray |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Set |
---|
add, addAll, clear, containsAll, equals, hashCode, remove, removeAll, retainAll, toArray, toArray |
Constructor Detail |
---|
public POPAppBasedSet()
Method Detail |
---|
public void addIndividual(java.lang.Object indiv, NumberVar popApp)
public void addSatisfiers(NumberVar popApp, ObjectSet satisfiers, java.util.Set newExceptions)
protected java.lang.Integer sizeInternal()
AbstractObjectSet
sizeInternal
in class AbstractObjectSet
protected java.lang.Boolean containsInternal(java.lang.Object o)
AbstractObjectSet
obj
,
Boolean.FALSE if this set does not contain obj
, and null
if the underlying partial world is not complete enough to make the
distinction.
containsInternal
in class AbstractObjectSet
public ObjectIterator iterator(java.util.Set externallyDistinguished)
ObjectSet
skipIndistinguishable
method treats all of the given objects as distinguishable from all
other objects, even if they are indistinguishable in the underlying
partial world. These externally distinguishable objects
are typically the values of logical variables in the current scope --
the point is that even if the partial world makes the same assertions
about two objects, these objects may satisfy different formulas if
one is the value of a currently bound variable and one is not.
public ObjectSet getExplicitVersion()
ObjectSet
This method returns null if the underlying partial world is not complete enough to construct an explicit version of this set.
public java.lang.Object sample(int n)
ObjectSet
n is sampled uniformly
from the numbers 0, ..., size - 1 (where size is the
size of this set).
If the underlying partial world is not complete enough to
fully define this set, this method returns null.
public int indexOf(java.lang.Object o)
ObjectSet
sample
,
will yield the given element of this set. If the given object is
not in this set, returns -1.
If the underlying partial world is not complete enough to fully define this set, this method returns -1.
public java.lang.String toString()
toString
in class java.util.AbstractCollection
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |