com.miginfocom.util.dates
Class RangeCount

java.lang.Object
  extended by com.miginfocom.util.dates.RangeCount
All Implemented Interfaces:
java.io.Serializable

public class RangeCount
extends java.lang.Object
implements java.io.Serializable

A class that makes it possible to denote a certain abount of some time unit. For instance "three days" or "20 minutes".
The class is immutable.

See Also:
Serialized Form

Constructor Summary
RangeCount(int count, int type)
          Constructor.
 
Method Summary
 boolean equals(java.lang.Object o)
           
 int getCount()
          Returns the amount.
 int getType()
          Returns the range type.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RangeCount

public RangeCount(int count,
                  int type)
Constructor.

Parameters:
count - The number of type.
type - The actual type, e.g. DateRangeI.RANGE_TYPE_MINUTE. Though DateRangeI.RANGE_TYPE_CUSTOM is legal it makes little sens to use since it's "length" is undefined.
Method Detail

getCount

public final int getCount()
Returns the amount.

Returns:
The amount.

getType

public final int getType()
Returns the range type. E.g DateRangeI.RANGE_TYPE_DAY

Returns:
The range type.

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2009 MiG InfoCom AB. All Rights Reserved.