Range Class Reference
[Common wrapper and helper classes]

Integer's interval implementation and accompanying utility methods. More...

Inheritance diagram for Range:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($min=null, $max=null)
 getMin ()
 setMin ($min=null)
 
Exceptions:
WrongArgumentException 

 getMax ()
 setMax ($max=null)
 
Exceptions:
WrongArgumentException 

 toString ($from= 'от', $to= 'до')
 atavism wrt BC
 divide ($factor, $precision=null)
 
Returns:
Range

 multiply ($multiplier)
 
Returns:
Range

 equals (Range $range)
 intersects (Range $range)
 isEmpty ()

Static Public Member Functions

static create ($min=null, $max=null)
 
Returns:
Range

static lazyCreate ($min=null, $max=null)
 
Returns:
Range


Private Attributes

 $min = null
 $max = null


Detailed Description

Integer's interval implementation and accompanying utility methods.

Definition at line 18 of file Range.class.php.


Constructor & Destructor Documentation

Range::__construct ( min = null,
max = null 
)

Definition at line 23 of file Range.class.php.

References $max, and $min.


Member Function Documentation

static Range::create ( min = null,
max = null 
) [static]

Returns:
Range

Reimplemented in IntegerSet.

Definition at line 38 of file Range.class.php.

References $max, and $min.

static Range::lazyCreate ( min = null,
max = null 
) [static]

Returns:
Range

Definition at line 46 of file Range.class.php.

References $max, and $min.

Referenced by PrimitiveRange::importMarried(), and PrimitiveRange::importSingle().

Range::getMin (  ) 

Definition at line 54 of file Range.class.php.

Referenced by IntegerSet::contains(), equals(), and intersects().

Range::setMin ( min = null  ) 

Exceptions:
WrongArgumentException 

Returns:
Range

Definition at line 63 of file Range.class.php.

References $min.

Range::getMax (  ) 

Definition at line 80 of file Range.class.php.

Referenced by IntegerSet::contains(), equals(), and intersects().

Range::setMax ( max = null  ) 

Exceptions:
WrongArgumentException 

Returns:
Range

Definition at line 89 of file Range.class.php.

References $max.

Range::toString ( from = 'от',
to = 'до' 
)

atavism wrt BC

Definition at line 107 of file Range.class.php.

References $out.

Range::divide ( factor,
precision = null 
)

Returns:
Range

Definition at line 123 of file Range.class.php.

Range::multiply ( multiplier  ) 

Returns:
Range

Definition at line 137 of file Range.class.php.

Range::equals ( Range range  ) 

Definition at line 148 of file Range.class.php.

References getMax(), and getMin().

Here is the call graph for this function:

Range::intersects ( Range range  ) 

Definition at line 154 of file Range.class.php.

References getMax(), and getMin().

Here is the call graph for this function:

Range::isEmpty (  ) 

Definition at line 160 of file Range.class.php.


Member Data Documentation

Range::$min = null [private]

Definition at line 20 of file Range.class.php.

Referenced by __construct(), create(), IntegerSet::create(), lazyCreate(), and setMin().

Range::$max = null [private]

Definition at line 21 of file Range.class.php.

Referenced by __construct(), create(), IntegerSet::create(), lazyCreate(), and setMax().


The documentation for this class was generated from the following file:
Generated on Sun Dec 9 21:58:21 2007 for onPHP by  doxygen 1.5.4