|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.AbstractCollection | +--java.util.AbstractList | +--java.util.Vector | +--com.iphrase.runtime.query.constraint.Conjunction
Represent a collection of constraint Disjunction
instances
ANDed together by this conjunction.
Note that neither ArrayList (nor List) support setSize(), so I've implemented this as a Vector.
Constructor Summary | |
Conjunction()
|
|
Conjunction(java.lang.String state)
|
Method Summary | |
boolean |
contains(Constraint constraint)
Determine if the designated constraint is the same as a constraint in one of the disjunctions in this conjunction. |
boolean |
contains(Disjunction disjunction)
Determine if the designated disjunction is the same as one of the disjunctions int this conjunction. |
void |
cull(Conjunction conjunction)
|
void |
cull(Disjunction disjunction)
Cull a disjunction from this conjunction. |
boolean |
matches(Constraint c)
Determine whether this conjunction has any constraints that match (as defined by Constraint.matches(com.iphrase.runtime.query.constraint.Constraint) ) the designated constraint. |
void |
merge(Conjunction conjunction)
|
void |
merge(Disjunction disjunction)
Merge a disjunction into this conjunction. |
Disjunction |
set(int index,
java.lang.String state)
Create a constraint Disjunction from a OneStep serialization String
and set the new disjunction to the specified index in this conjunction. |
void |
swap(Conjunction out,
Conjunction in)
|
void |
swap(Constraint out,
Constraint in)
Replace all instances of one constraint with another, in place. |
java.lang.String |
toString()
Serialize this conjunction using the OneStep serialization format. |
Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, trimToSize |
Methods inherited from class java.util.AbstractList |
iterator, listIterator, listIterator |
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.List |
iterator, listIterator, listIterator |
Constructor Detail |
public Conjunction()
public Conjunction(java.lang.String state) throws ArgumentError
Method Detail |
public Disjunction set(int index, java.lang.String state) throws ArgumentError
Disjunction
from a OneStep serialization String
and set the new disjunction to the specified index in this conjunction.index
- int
position in this conjunctionstate
- OneStep serialization String
from which a Disjunction
can be createdQuery
methodpublic java.lang.String toString()
Object.toString()
toString
in class java.util.Vector
String
of this conjunctionpublic void swap(Constraint out, Constraint in)
matches(com.iphrase.runtime.query.constraint.Constraint)
)
'out' will be replaced with 'in'.out
- Constraint
to swap outin
- Constraint
to swap inpublic void swap(Conjunction out, Conjunction in)
public void merge(Disjunction disjunction)
cull(com.iphrase.runtime.query.constraint.Disjunction)
,
to avoid duplicates, then add the designated disjunction.disjunction
- the designated Disjunction
to mergepublic void merge(Conjunction conjunction)
public void cull(Disjunction disjunction)
matches(com.iphrase.runtime.query.constraint.Constraint)
) any constraints in the designated disjunction.
If any disjunction becomes empty as a result, remove it.disjunction
- the designated Disjunction
to cullpublic void cull(Conjunction conjunction)
public boolean matches(Constraint c)
Constraint.matches(com.iphrase.runtime.query.constraint.Constraint)
) the designated constraint.c
- Constraint
to be matchedtrue
if there is a match, else false
.public boolean contains(Constraint constraint)
constraint
- the designated Constraint
true
if and only if the designated constraint is the
same as a constraint in one of the disjunctions in this instance, as
determined by the equals method; false
otherwise.public boolean contains(Disjunction disjunction)
disjunction
- the designated Disjunction
true
if and only if the designated disjunction is the
same as one of the disjunctions in this instance, as determined by the
equals method; false
otherwise.
|
© Copyright 2005, 2006. IBM Corporation. All rights reserved. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |