org.apache.pivot.wtk
Class Limits

java.lang.Object
  extended by org.apache.pivot.wtk.Limits
All Implemented Interfaces:
Serializable

public final class Limits
extends Object
implements Serializable

Class representing minimum and maximum values.

See Also:
Serialized Form

Field Summary
 int max
           
static String MAX_KEY
           
 int min
           
static String MIN_KEY
           
 
Constructor Summary
Limits(Dictionary<String,?> limits)
           
Limits(int min, int max)
           
Limits(Limits limits)
           
 
Method Summary
static Limits decode(String value)
           
 boolean equals(Object object)
           
 int hashCode()
           
 int limit(int value)
          Limits the specified value to the min and max values of this object.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

min

public final int min

max

public final int max

MIN_KEY

public static final String MIN_KEY
See Also:
Constant Field Values

MAX_KEY

public static final String MAX_KEY
See Also:
Constant Field Values
Constructor Detail

Limits

public Limits(int min,
              int max)

Limits

public Limits(Limits limits)

Limits

public Limits(Dictionary<String,?> limits)
Method Detail

limit

public int limit(int value)
Limits the specified value to the min and max values of this object.

Parameters:
value - The value to limit
Returns:
The bounded value

equals

public boolean equals(Object object)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object

decode

public static Limits decode(String value)