org.elasticsearch.common.unit
Class TimeValue
java.lang.Object
org.elasticsearch.common.unit.TimeValue
- All Implemented Interfaces:
- Serializable, Streamable
public class TimeValue
- extends Object
- implements Serializable, Streamable
- See Also:
- Serialized Form
TimeValue
public TimeValue(long millis)
TimeValue
public TimeValue(long duration,
TimeUnit timeUnit)
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.