FreeHEP API
Version current

hep.aida.ext
Interface IRange

All Known Implementing Classes:
Range, Range

public interface IRange

Interface for a Range.

Author:
Tony Johnson, Victor Serbo, Max Turri
Source Code:
IRange.java

Field Summary
static int EXCLUDE_BOUNDS
           
static int INCLUDE_BOUNDS
          The IRange types.
static int INCLUDE_LOWER_BOUND
           
static int INCLUDE_UPPER_BOUND
           
 
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.
 

Field Detail

INCLUDE_BOUNDS

public static final int INCLUDE_BOUNDS
The IRange types. It determines if the boundaries are inside or outside the range.

See Also:
Constant Field Values

INCLUDE_UPPER_BOUND

public static final int INCLUDE_UPPER_BOUND
See Also:
Constant Field Values

INCLUDE_LOWER_BOUND

public static final int INCLUDE_LOWER_BOUND
See Also:
Constant Field Values

EXCLUDE_BOUNDS

public static final int EXCLUDE_BOUNDS
See Also:
Constant Field Values
Method Detail

type

public int type()
Get the IRange type.

Returns:
The IRange type.

setType

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

Parameters:
type - The IRange type.
Returns:
true if the type was set succesfully false otherwise

lowerBound

public double lowerBound()
Get the lower bound.

Returns:
The lower bound.

upperBound

public double upperBound()
Get the upper bound.

Returns:
The upper bound.

setLowerBound

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

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.

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.

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.