ilog.cpl.util
Class IlpRange

java.lang.Object
  extended by ilog.cpl.util.IlpRange

public class IlpRange
extends Object

Container class for a range of values, used to specify part of a domain.

Compatibility Note: In JViews 8.0, this class was moved from ilog.cpl.service to ilog.cpl.util.

Since:
JViews 8.0

Constructor Summary
IlpRange(Object minValue, Object maxValue)
          Constructs a new range.
 
Method Summary
 boolean contains(Object value)
          Checks whether a given value is included in the range.
 boolean equals(Object other)
          Test IlpRanges for equality.
 Object getMaxValue()
          Returns the maximum (inclusive) value of the range.
 Object getMinValue()
          Returns the minimum (inclusive) value of the range.
 int hashCode()
          Support for hashmap.
 String toString()
          Create a string containing the range.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IlpRange

public IlpRange(Object minValue,
                Object maxValue)
Constructs a new range. The minimum and maximum values have to be of the same type. If illegal values are used (i.e. different types for minimum and maximum or using a null value), both the minimum and maximum values are set to null.

Parameters:
minValue - The lower (inclusive) value of the range.
maxValue - The upper (inclusive) value of the range.
Method Detail

getMinValue

public Object getMinValue()
Returns the minimum (inclusive) value of the range.

Returns:
The minimum value of the range.

getMaxValue

public Object getMaxValue()
Returns the maximum (inclusive) value of the range.

Returns:
The maximum value of the range.

contains

public boolean contains(Object value)
Checks whether a given value is included in the range.

Parameters:
value - The value to check.
Returns:
true if the value is included in the range.

equals

public boolean equals(Object other)
Test IlpRanges for equality.

Overrides:
equals in class Object
Parameters:
other - Object to test for equality with.
Returns:
Returns true if the ranges are the same, false otherwise.

hashCode

public int hashCode()
Support for hashmap.

Overrides:
hashCode in class Object

toString

public String toString()
Create a string containing the range.

Overrides:
toString in class Object


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.