org.elasticsearch.common.unit
Class TimeValue

java.lang.Object
  extended by org.elasticsearch.common.unit.TimeValue
All Implemented Interfaces:
Serializable, Streamable

public class TimeValue
extends Object
implements Serializable, Streamable

See Also:
Serialized Form

Constructor Summary
TimeValue(long millis)
           
TimeValue(long duration, TimeUnit timeUnit)
           
 
Method Summary
 long days()
           
 double daysFrac()
           
 boolean equals(Object o)
           
 String format()
           
 String format(org.joda.time.PeriodType type)
           
 long getDays()
           
 double getDaysFrac()
           
 long getHours()
           
 double getHoursFrac()
           
 long getMicros()
           
 double getMicrosFrac()
           
 long getMillis()
           
 double getMillisFrac()
           
 long getMinutes()
           
 double getMinutesFrac()
           
 long getNanos()
           
 long getSeconds()
           
 double getSecondsFrac()
           
 int hashCode()
           
 long hours()
           
 double hoursFrac()
           
 long micros()
           
 double microsFrac()
           
 long millis()
           
 double millisFrac()
           
 long minutes()
           
 double minutesFrac()
           
 long nanos()
           
static TimeValue parseTimeValue(String sValue, TimeValue defaultValue)
           
 void readFrom(StreamInput in)
           
static TimeValue readTimeValue(StreamInput in)
           
 long seconds()
           
 double secondsFrac()
           
static TimeValue timeValueHours(long hours)
           
static TimeValue timeValueMillis(long millis)
           
static TimeValue timeValueMinutes(long minutes)
           
static TimeValue timeValueNanos(long nanos)
           
static TimeValue timeValueSeconds(long seconds)
           
 String toString()
           
 void writeTo(StreamOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeValue

public TimeValue(long millis)

TimeValue

public TimeValue(long duration,
                 TimeUnit timeUnit)
Method Detail

timeValueNanos

public static TimeValue timeValueNanos(long nanos)

timeValueMillis

public static TimeValue timeValueMillis(long millis)

timeValueSeconds

public static TimeValue timeValueSeconds(long seconds)

timeValueMinutes

public static TimeValue timeValueMinutes(long minutes)

timeValueHours

public static TimeValue timeValueHours(long hours)

nanos

public long nanos()

getNanos

public long getNanos()

micros

public long micros()

getMicros

public long getMicros()

millis

public long millis()

getMillis

public long getMillis()

seconds

public long seconds()

getSeconds

public long getSeconds()

minutes

public long minutes()

getMinutes

public long getMinutes()

hours

public long hours()

getHours

public long getHours()

days

public long days()

getDays

public long getDays()

microsFrac

public double microsFrac()

getMicrosFrac

public double getMicrosFrac()

millisFrac

public double millisFrac()

getMillisFrac

public double getMillisFrac()

secondsFrac

public double secondsFrac()

getSecondsFrac

public double getSecondsFrac()

minutesFrac

public double minutesFrac()

getMinutesFrac

public double getMinutesFrac()

hoursFrac

public double hoursFrac()

getHoursFrac

public double getHoursFrac()

daysFrac

public double daysFrac()

getDaysFrac

public double getDaysFrac()

format

public String format()

format

public String format(org.joda.time.PeriodType type)

toString

public String toString()
Overrides:
toString in class Object

parseTimeValue

public static TimeValue parseTimeValue(String sValue,
                                       TimeValue defaultValue)

readTimeValue

public static TimeValue readTimeValue(StreamInput in)
                               throws IOException
Throws:
IOException

readFrom

public void readFrom(StreamInput in)
              throws IOException
Specified by:
readFrom in interface Streamable
Throws:
IOException

writeTo

public void writeTo(StreamOutput out)
             throws IOException
Specified by:
writeTo in interface Streamable
Throws:
IOException

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009-2012. All Rights Reserved.