com.scaleoutsoftware.soss.client
Class TimeSpan

java.lang.Object
  extended by com.scaleoutsoftware.soss.client.TimeSpan
All Implemented Interfaces:
Serializable

public final class TimeSpan
extends Object
implements Serializable

An object of this class represents a time interval.

See Also:
Serialized Form

Field Summary
static TimeSpan INFINITE_TIMEOUT
           
 
Method Summary
 boolean between(TimeSpan first, TimeSpan second)
           
 boolean equals(Object o)
           
static TimeSpan fromMilliseconds(long millis)
          Create TimeSpan from number of milliseconds
static TimeSpan fromMinutes(long minutes)
          Create TimeSpan from number of minutes
static TimeSpan fromSeconds(long seconds)
          Create TimeSpan from number of seconds
 int getSeconds()
          Gets the time span in seconds
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INFINITE_TIMEOUT

public static final TimeSpan INFINITE_TIMEOUT
Method Detail

getSeconds

public int getSeconds()
Gets the time span in seconds

Returns:
time span in seconds

between

public boolean between(TimeSpan first,
                       TimeSpan second)
Parameters:
first - first time span
second - second time span
Returns:
true if length of this timespan is between first and second timespan

fromSeconds

public static TimeSpan fromSeconds(long seconds)
Create TimeSpan from number of seconds

Parameters:
seconds - time span in seconds
Returns:
new TimeSpan

fromMinutes

public static TimeSpan fromMinutes(long minutes)
Create TimeSpan from number of minutes

Parameters:
minutes - time span in minutes
Returns:
new TimeSpan

fromMilliseconds

public static TimeSpan fromMilliseconds(long millis)
Create TimeSpan from number of milliseconds

Parameters:
millis - time span in milliseconds
Returns:
new TimeSpan

equals

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


Copyright (C) 2007-2012 ScaleOut Software, Inc.