FreeHEP API
Version current

hep.aida.ref.pdf
Class Range

java.lang.Object
  extended byhep.aida.ref.pdf.Range
All Implemented Interfaces:
IRange

public class Range
extends Object
implements IRange

Implementation of IRange.

Author:
The FreeHEP team @ SLAC.
Source Code:
Range.java

Field Summary
 
Fields inherited from interface hep.aida.ext.IRange
EXCLUDE_BOUNDS, INCLUDE_BOUNDS, INCLUDE_LOWER_BOUND, INCLUDE_UPPER_BOUND
 
Constructor Summary
Range()
          Creates a new instance of Range.
Range(double lowerBound, double upperBound)
          Creates a new instance of Range with type INCLUDE_BOUNDS.
Range(double lowerBound, double upperBound, int type)
          Creates a new instance of Range.
 
Method Summary
 boolean isInRange(double value)
          Check if a value is within the IRange.
 double lowerBound()
          Get the lower bound.
 boolean setLowerBound(double lowerBound)
          Set the lower bound.
 boolean setType(int type)
          Set the IRange type.
 boolean setUpperBound(double upperBound)
          Set the upper bound.
 int type()
          Get the IRange type.
 double upperBound()
          Get the upper bound.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Range

public Range()
Creates a new instance of Range.


Range

public Range(double lowerBound,
             double upperBound)
Creates a new instance of Range with type INCLUDE_BOUNDS.

Parameters:
lowerBound - The lower bound.
upperBound - The upper bound.

Range

public Range(double lowerBound,
             double upperBound,
             int type)
Creates a new instance of Range.

Parameters:
lowerBound - The lower bound.
upperBound - The upper bound.
type - The Range type.
Method Detail

type

public int type()
Get the IRange type.

Specified by:
type in interface IRange
Returns:
The IRange type.

setType

public boolean setType(int type)
Set the IRange type.

Specified by:
setType in interface IRange
Parameters:
type - The IRange type.
Returns:
true if the type was set succesfully false otherwise

lowerBound

public double lowerBound()
Get the lower bound.

Specified by:
lowerBound in interface IRange
Returns:
The lower bound.

upperBound

public double upperBound()
Get the upper bound.

Specified by:
upperBound in interface IRange
Returns:
The upper bound.

setLowerBound

public boolean setLowerBound(double lowerBound)
Set the lower bound.

Specified by:
setLowerBound in interface IRange
Parameters:
lowerBound - The lower bound.
Returns:
true if the lower bound was set succesfully false if lowerBound is greater than the upper bound.

setUpperBound

public boolean setUpperBound(double upperBound)
Set the upper bound.

Specified by:
setUpperBound in interface IRange
Parameters:
upperBound - The upper bound.
Returns:
true if the upper bound was set succesfully false if upperBound is smaller than the lower bound.

isInRange

public boolean isInRange(double value)
Check if a value is within the IRange.

Specified by:
isInRange in interface IRange
Parameters:
value - The value to check.
Returns:
true if the value is within the range. false otherwise.

FreeHEP API
Version current

Copyright © 2000-2004 FreeHEP, All Rights Reserved.