public class BooleanDependency extends java.lang.Object implements Dependency
Red (eal) |
Yellow (eal) |
Modifier and Type | Field and Description |
---|---|
protected boolean |
_value
The value.
|
static BooleanDependency |
OPLUS_IDENTITY
The additive identity, which has value false and indicates
that there is no dependency.
|
static BooleanDependency |
OTIMES_IDENTITY
The multiplicative identity, which has value true and
indicates that there is a dependency.
|
EQUALS, GREATER_THAN, INCOMPARABLE, LESS_THAN
Modifier | Constructor and Description |
---|---|
protected |
BooleanDependency(boolean value)
Construct a dependency with the specified value.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Dependency dependency)
Return Dependency.LESS_THAN, EQUALS, or GREATER_THAN depending
on whether the argument is less than, equal to, or greater than
this dependency.
|
boolean |
equals(java.lang.Object object)
Return true if the value of this dependency equals that
of the specified one, and the specified one is an instance
of RealDependency.
|
int |
hashCode()
Return the same hashCode that that Java Boolean object would
return had it the same value, which is
the integer 1231 if this object represents true,
and the integer 1237 if this object represents false.
|
Dependency |
oPlus(Dependency d)
Return a dependency that results from parallel composition of
this one and the specified one.
|
Dependency |
oPlusIdentity()
Return the dependency that when added to any other
dependency using oPlus() yields the other dependency.
|
Dependency |
oTimes(Dependency d)
Return a dependency that results from serial composition of
this one and the specified one.
|
Dependency |
oTimesIdentity()
Return the dependency that when multiplied by any other
dependency using oTimes() yields the other dependency.
|
java.lang.String |
toString()
Return a string representation in the form
"BooleanDependency(value)", where value is "true"
or "false".
|
static BooleanDependency |
valueOf(boolean value)
Return an instance of BooleanDependency with the specified
value.
|
public static final BooleanDependency OPLUS_IDENTITY
public static final BooleanDependency OTIMES_IDENTITY
protected boolean _value
protected BooleanDependency(boolean value)
value
- The value.public int compareTo(Dependency dependency)
compareTo
in interface java.lang.Comparable<Dependency>
dependency
- The dependency to compare against.public boolean equals(java.lang.Object object)
equals
in class java.lang.Object
object
- The object to compare against.public int hashCode()
hashCode
in class java.lang.Object
public Dependency oPlus(Dependency d)
oPlus
in interface Dependency
d
- The dependency to add.java.lang.ClassCastException
- if d is not a BooleanDependency.public Dependency oPlusIdentity()
oPlusIdentity
in interface Dependency
public Dependency oTimes(Dependency d)
oTimes
in interface Dependency
d
- The dependency to multiply.java.lang.ClassCastException
- if d is not a BooleanDependency.public Dependency oTimesIdentity()
oTimesIdentity
in interface Dependency
public java.lang.String toString()
toString
in class java.lang.Object
public static BooleanDependency valueOf(boolean value)
value
- The specified value.OTIMES_IDENTITY
is returned, if
value is false, then OPLUS_IDENTITY
.