All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tadt.standard.LeftOperandSemantics

java.lang.Object
   |
   +----tadt.standard.LeftOperandSemantics

public class LeftOperandSemantics
extends Object
implements Semantics
LeftOperandSemantics implements a left operand semantics whereby the right operand is cast to the granularity of the left operand prior to performing the operation. Below is an example of the semantics.
     LeftOperandSemantics ops = new LeftOperandSemantics();
     Granularity months = new Granularity("months", 32);
     Granularity days = new Granularity("days", 32);
     Instant i = new Instant(days, "34");
     Interval j = new Interval(months, "100");
     Instant k = ops.add(i,j); // k is in the granularity of "days"
  


Constructor Index

 o LeftOperandSemantics()

Method Index

 o add(Anchorable, Unanchorable)
Displace (add) an Anchorable with an Unanchorable.
 o add(Unanchorable, Anchorable)
Displace (add) an Unanchorable with an Anchorable.
 o contains(Anchorable, Anchorable)
Does one Anchorable contain another?
 o divide(Unanchorable, TimeValue)
Divide an Unanchorable by a TimeValue.
 o divide(Unanchorable, Unanchorable)
Divide an Unanchorable by an Unanchorable.
 o equalTo(Anchorable, Anchorable)
Is one Anchorable equalTo another? Currently this does not distinguish the "kinds" of Anchorables, although we could change this as needed to just do each kind.
 o meets(Anchorable, Anchorable)
Does one Anchorable meet another?
 o multiply(Unanchorable, TimeValue)
Multiply an Unanchorable by a TimeValue.
 o negate(Unanchorable)
Negate an Unanchorable.
 o overlaps(Anchorable, Anchorable)
Does one Anchorable overlap another? This is true iff there is some Period in the Anchorable that overalps some Period in the other Anchorable.
 o precedes(Anchorable, Anchorable)
Does one Anchorable precede another?
 o subtract(Anchorable, Unanchorable)
Displace (subtract) an Anchorable with an Unanchorable.
 o subtract(Unanchorable, Anchorable)
Displace (subtract) an Unanchorable with an Anchorable

Constructors

 o LeftOperandSemantics
  public LeftOperandSemantics()

Methods

 o precedes
  public ExtendedBoolean precedes(Anchorable alpha,
                                  Anchorable beta)
Does one Anchorable precede another?

Parameters:
alpha - - Anchorable to compare
beta - - Anchorable to compare
Returns:
true or false
 o overlaps
  public ExtendedBoolean overlaps(Anchorable alpha,
                                  Anchorable beta)
Does one Anchorable overlap another? This is true iff there is some Period in the Anchorable that overalps some Period in the other Anchorable.

Parameters:
alpha - - Anchorable to compare
beta - - Anchorable to compare
Returns:
true or false
 o meets
  public ExtendedBoolean meets(Anchorable alpha,
                               Anchorable beta)
Does one Anchorable meet another?

Parameters:
alpha - - Anchorable to compare
beta - - Anchorable to compare
Returns:
ExtendedBoolean
 o contains
  public ExtendedBoolean contains(Anchorable alpha,
                                  Anchorable beta)
Does one Anchorable contain another?

Parameters:
alpha - - Anchorable to compare
beta - - Anchorable to compare
Returns:
ExtendedBoolean
 o equalTo
  public ExtendedBoolean equalTo(Anchorable alpha,
                                 Anchorable beta)
Is one Anchorable equalTo another? Currently this does not distinguish the "kinds" of Anchorables, although we could change this as needed to just do each kind.

Parameters:
alpha - - Anchorable to compare
beta - - Anchorable to compare
Returns:
ExtendedBoolean
 o add
  public Anchorable add(Anchorable alpha,
                        Unanchorable beta)
Displace (add) an Anchorable with an Unanchorable.

Parameters:
alpha - - displacee
beta - - displacor
Returns:
- (alpha + cast(beta,alpha.granularity))
 o add
  public Anchorable add(Unanchorable alpha,
                        Anchorable beta)
Displace (add) an Unanchorable with an Anchorable.

Parameters:
alpha - - displacor
beta - - displacee
Returns:
- (alpha + cast(beta,alpha.granularity))
 o subtract
  public Anchorable subtract(Anchorable alpha,
                             Unanchorable beta)
Displace (subtract) an Anchorable with an Unanchorable.

Parameters:
alpha - - displacee
beta - - displacor
Returns:
- (alpha - cast(beta,alpha.granularity))
 o subtract
  public Anchorable subtract(Unanchorable alpha,
                             Anchorable beta)
Displace (subtract) an Unanchorable with an Anchorable

Parameters:
alpha - - displacor
beta - - displacee
Returns:
- (-alpha + cast(beta,alpha.granularity))
 o negate
  public Unanchorable negate(Unanchorable alpha)
Negate an Unanchorable. Note this will mutate the result parameter.

Parameters:
alpha - - Unanchorable to negate
Returns:
- -alpha
 o multiply
  public Unanchorable multiply(Unanchorable alpha,
                               TimeValue n)
Multiply an Unanchorable by a TimeValue.

Parameters:
alpha - - Unanchorable to multiply
n - - how many
Returns:
result - (alpha * n)
 o divide
  public TimeValue[] divide(Unanchorable alpha,
                            Unanchorable beta)
Divide an Unanchorable by an Unanchorable.

Parameters:
alpha - - divisee
beta - - divisor
result - - (TimeValue) alpha/beta
 o divide
  public Unanchorable divide(Unanchorable alpha,
                             TimeValue n)
Divide an Unanchorable by a TimeValue.

Parameters:
alpha - - divisee
n - - divisor
result - - alpha/n

All Packages  Class Hierarchy  This Package  Previous  Next  Index