public class RealDependency extends java.lang.Object implements Dependency
| Red (eal) |
| Yellow (eal) |
| Modifier and Type | Field and Description |
|---|---|
static RealDependency |
OPLUS_IDENTITY
The additive identity.
|
static RealDependency |
OTIMES_IDENTITY
The multiplicative identity.
|
EQUALS, GREATER_THAN, INCOMPARABLE, LESS_THAN| 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 Double object would
return had it the same value.
|
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
"RealDependency(value)".
|
double |
value()
Return the double value of the dependency.
|
static RealDependency |
valueOf(double value)
Return an instance of RealDependency with the specified
value.
|
public static final RealDependency OPLUS_IDENTITY
public static final RealDependency OTIMES_IDENTITY
public int compareTo(Dependency dependency)
compareTo in interface java.lang.Comparable<Dependency>dependency - The dependency to compare against.java.lang.ClassCastException - If the argument is not an instance
of RealDependency.public boolean equals(java.lang.Object object)
equals in class java.lang.Objectobject - The object to compare against.public int hashCode()
hashCode in class java.lang.Objectpublic Dependency oPlus(Dependency d)
oPlus in interface Dependencyd - The dependency to add.java.lang.ClassCastException - if d is not a RealDependency.public Dependency oPlusIdentity()
oPlusIdentity in interface Dependencypublic Dependency oTimes(Dependency d)
oTimes in interface Dependencyd - The dependency to multiply.java.lang.ClassCastException - if d is not a RealDependency.public Dependency oTimesIdentity()
oTimesIdentity in interface Dependencypublic java.lang.String toString()
toString in class java.lang.Objectpublic double value()
public static RealDependency valueOf(double value)
value - The value used to determine the RealDependency
to be returned.OTIMES_IDENTITY is returned, if
value is Double.POSITIVE_INFINITY, then OPLUS_IDENTITY
is returned. Otherwise the RealDependency constructor
is called.