|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.caleigo.core.Qualifier
org.caleigo.core.CompositeQualifier
The CompositeQualifier is a Qualifier that contains a collection of other Qualifiers wrapping them as a single Qalifier effectively implementing the "Composite" design pattern. A CompositeQualifier can form either a union or an intersection of the contained Qualifiers which is defined at the creation.
Nested Class Summary | |
protected static class |
CompositeQualifier.UniqueQualifierVisitor
|
Nested classes inherited from class org.caleigo.core.Qualifier |
Qualifier.RelayListener |
Field Summary | |
static int |
INTERSECTION
Used to state that all contained Qualifiers defines a intersection which means that they should be combined using using logical "AND". |
static int |
UNION
Used to state that all contained Qualifiers defines a union which means that they should be combined using using logical "OR". |
Constructor Summary | |
CompositeQualifier()
Default constructor that creates a new CompositeQualifier forming an intersection of any added Qualifiers. |
|
CompositeQualifier(int unionType)
Creates a new CompositeQualifier forming either an intersection or a union depending on the provided of the union type constant. |
|
CompositeQualifier(Qualifier qualifier1,
Qualifier qualifier2)
Creates a new CompositeQualifier forming an intersection of the two provided Qualifiers. |
|
CompositeQualifier(Qualifier qualifier1,
Qualifier qualifier2,
int unionType)
Creates a new CompositeQualifier forming either an intersection or a union depending on the defined of the unionType two provided Qualifiers. |
Method Summary | |
void |
add(Qualifier qualifier)
Adds a new Qulifier to contained collection of Qualifiers. |
void |
addQualifierListener(IQualifierListener listener)
Adds an IQualifierListener to receive notifications of contents and structure changes from the Qualifier object. |
boolean |
canDirectlyQualify(IEntityDescriptor entityDescriptor)
This abstract method must return true if the qualifier can select entities of the type defined by the provided entity descriptor without the nead of any complementary data. |
boolean |
canQualify(IEntityDescriptor entityDescriptor)
This method returns true if the qualifier can select entities of the type defined by the provided entity descriptor. |
boolean |
canUniquelyQualify(IEntityDescriptor entityDescriptor)
This method returns true if the qualifier can uniquely select entities of the type defined by the provided entity descriptor. |
boolean |
doesQualify(IEntity entity)
This method returns true if the qualifier does select the provided entity object. |
Qualifier |
getQualifier(int index)
Access method that returns the indexed contained Qualifier. |
int |
getQualifierCount()
Access method that returns the count of the contained Qualifiers. |
java.util.Iterator |
getQualifiers()
Access method that returns an Iterator object for the cotained collection of Qualifier objects. |
int |
getUnionType()
Access method that returns the Qualifiers union defined by one of the constants UNION or INTERSECTION. |
java.lang.String |
toString()
The toString method returns an "abstract" expression of what the qualifier selects. |
Methods inherited from class org.caleigo.core.Qualifier |
and, and, and, combine, create, create, fireContentChangedEvent, fireQualifierEvent, fireStructureChangedEvent, negate, or, or, or, removeQualifierListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final int UNION
public static final int INTERSECTION
Constructor Detail |
public CompositeQualifier()
public CompositeQualifier(int unionType)
public CompositeQualifier(Qualifier qualifier1, Qualifier qualifier2)
public CompositeQualifier(Qualifier qualifier1, Qualifier qualifier2, int unionType)
Method Detail |
public boolean doesQualify(IEntity entity)
doesQualify
in class Qualifier
public boolean canQualify(IEntityDescriptor entityDescriptor)
canQualify
in class Qualifier
public boolean canDirectlyQualify(IEntityDescriptor entityDescriptor)
canDirectlyQualify
in class Qualifier
public boolean canUniquelyQualify(IEntityDescriptor entityDescriptor)
canUniquelyQualify
in class Qualifier
public void addQualifierListener(IQualifierListener listener)
addQualifierListener
in class Qualifier
public java.lang.String toString()
public void add(Qualifier qualifier)
public int getUnionType()
public int getQualifierCount()
public Qualifier getQualifier(int index)
java.lang.IndexOutOfBoundsException
public java.util.Iterator getQualifiers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |