Class Magnitude

Description

Magnitude has methods for dealing with linearly ordered collections.

Subclasses represent dates, times, and numbers.

Example for interval-testing (answers a Boolean): $seven->between($five, $ten);

No instance-variables.

Located in /harmoni/core/Primitives/Magnitudes/Magnitude.class.php (line 38)

SObject
   |
   --Magnitude
Direct descendents
Class Description
DateAndTime I represent a point in UTC time as defined by ISO 8601. I have zero duration.
Duration I represent a duration of time. I have been tested to support durations of up to 4 billion (4,000,000,000) years with second precision and up to 50 billion (50,000,000) years with hour precision. Durations beyond 50 billion years have not been tested.
Time This represents a period of time.
Timespan Timespan represents a duration starting at a specific DateAndTime.
Number This is a partial port of the Squeak/Smalltalk Number class.
Method Summary
boolean isEqualTo (object Magnitude $aMagnitude)
boolean isGreaterThan (object Magnitude $aMagnitude)
boolean isGreaterThanOrEqualTo (object Magnitude $aMagnitude)
boolean isLessThan (object Magnitude $aMagnitude)
boolean isLessThanOrEqualTo (object Magnitude $aMagnitude)
Methods
isBetween (line 114)

Answer whether the receiver is less than or equal to the argument, max, and greater than or equal to the argument, min.

  • since: 5/4/05
  • access: public
boolean isBetween (object Magnitude $min, object Magnitude $max)
isEqualTo (line 63)

Test if this is equal to aMagnitude.

  • since: 5/4/05
  • access: public
boolean isEqualTo (object Magnitude $aMagnitude)

Redefinition of:
SObject::isEqualTo()
Answer whether the receiver and the argument are the same.

Redefined in descendants as:
isGreaterThan (line 76)

Test if this is greater than aMagnitude.

  • since: 5/3/05
  • access: public
boolean isGreaterThan (object Magnitude $aMagnitude)
isGreaterThanOrEqualTo (line 100)

Test if this is greater than aMagnitude.

  • since: 5/3/05
  • access: public
boolean isGreaterThanOrEqualTo (object Magnitude $aMagnitude)
isLessThan (line 50)

Test if this is less than aMagnitude.

  • since: 5/4/05
  • access: public
boolean isLessThan (object Magnitude $aMagnitude)

Redefined in descendants as:
isLessThanOrEqualTo (line 88)

Test if this is greater than aMagnitude.

  • since: 5/3/05
  • access: public
boolean isLessThanOrEqualTo (object Magnitude $aMagnitude)
max (line 127)

Answer the receiver or the argument, whichever has the greater magnitude.

  • since: 5/4/05
  • access: public
object Magnitude max (object Magnitude $aMagnitude)
min (line 143)

Answer the receiver or the argument, whichever has the lesser magnitude.

  • since: 5/4/05
  • access: public
object Magnitude min (object Magnitude $aMagnitude)

Inherited Methods

Inherited From SObject

SObject::asA()
SObject::asString()
SObject::copy()
SObject::copySameFrom()
SObject::copyTwoLevel()
SObject::deepCopy()
SObject::isEqual()
SObject::isEqualTo()
SObject::isNotEqualTo()
SObject::isNotReferenceTo()
SObject::isReferenceTo()
SObject::newFrom()
SObject::postCopy()
SObject::printableString()
SObject::shallowCopy()
SObject::_deepCopyArray()

Documentation generated on Wed, 19 Sep 2007 10:24:56 -0400 by phpDocumentor 1.3.0RC3