|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.query.conditions.Condition
public abstract class Condition
An abstract base class for all Condition
objects. It provides
the basic functionality and support for conditions and their logical
connectives that are used to combine Condition
objects
together. It answers whether a given Object
satisfies it or
not.
This class is intended to be subclassed by clients.
Field Summary | |
---|---|
static Condition |
FALSE
A constant Condition object used to indicate a never
satisfied condition |
static Condition |
TRUE
A constant Condition object used to indicate an always
satisfied condition |
Constructor Summary | |
---|---|
protected |
Condition()
A simple constructor. |
Method Summary | |
---|---|
Condition |
AND(Condition condition)
This operation acts like a logical AND between this Condition and the argument Condition . |
Condition |
EQUIVALENT(Condition condition)
This operation acts like a logical Equivalent (if-and-only-if)/( <->) between this Condition and the argument
Condition . |
Condition |
IMPLIES(Condition condition)
This operation acts like a logical Implies (if-then)/(->) between this Condition and the argument Condition . |
abstract boolean |
isSatisfied(Object object)
This operation is the evaluation operation of this Condition
in regard to the argument Object. |
Condition |
OR(Condition condition)
This operation acts like a logical OR between this Condition
and the argument Condition . |
Condition |
XOR(Condition condition)
This operation acts like a logical XOR between this Condition and the argument Condition . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Condition TRUE
Condition
object used to indicate an always
satisfied condition
public static final Condition FALSE
Condition
object used to indicate a never
satisfied condition
Constructor Detail |
---|
protected Condition()
Method Detail |
---|
public Condition AND(Condition condition)
Condition
and the argument Condition
. The
returned Condition
is a newly created
Condition
which is satisfied only if both its constituent
Condition
s are.
Please note that the newly compounded Condition
will
evaluate this Condition
first, and if the result is
true
, it will evaluate the argument
Condition
ANDing both results as its own final result.
This means that the argument Condition
could be
short-circuited and might not be evaluated at all.
condition
- a Condition
to be ANDed with this one.
Condition
object that represents
the ANDing of this Condition
with the argument
Condition
.public Condition OR(Condition condition)
Condition
and the argument Condition
. The returned
Condition
is a newly created Condition
which is satisfied if either of its constituent Condition
s is. Please note that the newly compounded Condition
will
evaluate this Condition
first, and if the result is
true
, it won't evaluate the argument
Condition
and it will return true
as its
final result, if, on the other hand the evaluation of the first
Condition
is false
, the argument
Condition
will be evaluated and its returned result will
be ORed with this one's and the resulting boolean will be returned as the
compounded Condition
own final result. This means that the
argument Condition
could be short-circuited and might not
be evaluated at all.
condition
- a Condition
to be ORed with this one.
Condition
object that represents
the ORing of this Condition
with the argument
Condition
.public Condition XOR(Condition condition)
Condition
and the argument Condition
. The
returned Condition
is a newly created
Condition
which is satisfied if XORing its constituent
Condition
s is.
condition
- a Condition
to be XORed with this one.
Condition
object that represents
the XORing of this Condition
with the argument
Condition
.public Condition IMPLIES(Condition condition)
Condition
and the argument Condition
. The
returned Condition
is a newly created
Condition
which is satisfied if the result of this
Condition
's evaluation is false
, in which
case the argument Condition
will not be evaluated at all,
or, if the both its constituent Condition
s evaluate to
true
.
condition
- a Condition
to be used in the Imply relation
with this one.
Condition
object that represents
the Imply logical relation between this Condition
and the argument Condition
.public Condition EQUIVALENT(Condition condition)
Condition
and the argument
Condition
. The returned Condition
is a
newly created Condition
which is satisfied if the result
of both its constituent Condition
s evaluate to the same
value.(both are true
, or both are false
)
condition
- a Condition
to be used in the Equivalent
relation with this one.
Condition
object that represents
the Equivalent logical relation between this
Condition
and the argument Condition
.public abstract boolean isSatisfied(Object object)
Condition
in regard to the argument Object. In other words, the operation answers
whether the argument Object satisfied this Condition
or
not.
object
- an Object to check if it satisfies this Condition
true
if the argument Object satisfies this
Condition
,false
otherwise.
|
Copyright 2002, 2007 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |