public class IntervalDayTimeWritable extends Object implements WritableComparable<IntervalDayTimeWritable>
Writable 和 WritableComparable
的实现| Modifier and Type | Class and Description |
|---|---|
static class |
IntervalDayTimeWritable.Comparator
IntervalDayTimeWritable 对象的
WritableComparator 自然顺序实现(升序). |
static class |
IntervalDayTimeWritable.DecreasingComparator
IntervalDayTimeWritable 对象的
WritableComparator 降序实现. |
| Constructor and Description |
|---|
IntervalDayTimeWritable()
默认构造 interval 值为0的 IntervalDayTimeWritable.
|
IntervalDayTimeWritable(IntervalDayTime value)
根据给定的IntervalDayTime对象构造IntervalDayTimeWritable
|
IntervalDayTimeWritable(long totalSeconds,
int nanos)
根据给定的秒和纳秒值构造IntervalDayTimeWritable
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(IntervalDayTimeWritable o) |
boolean |
equals(Object o) |
IntervalDayTime |
get()
获取该writable对应的IntervalDayTime对象
|
int |
getNanos()
获取该writable对应的时间间隔中秒以下精确到纳秒的部分
|
long |
getTotalSeconds()
获取该writable对应的种秒数间隔
|
int |
hashCode() |
void |
readFields(DataInput in)
从指定的
DataInput in 反序列化. |
void |
set(IntervalDayTime interval)
根据给定的 IntervalDayTime 对象构造IntervalDayTimeWritable
|
void |
set(long totalSeconds,
int nanos)
根据给定的秒和纳秒值设置IntervalDayTimeWritable的值
|
void |
write(DataOutput out)
序列化到指定的
DataOutput out. |
public IntervalDayTimeWritable()
public IntervalDayTimeWritable(IntervalDayTime value)
value - 给定的IntervalDayTime对象public IntervalDayTimeWritable(long totalSeconds,
int nanos)
totalSeconds - 总秒数nanos - 纳秒值public IntervalDayTime get()
public long getTotalSeconds()
public int getNanos()
public void set(long totalSeconds,
int nanos)
totalSeconds - 总秒数nanos - 纳秒值public void set(IntervalDayTime interval)
public void readFields(DataInput in) throws IOException
WritableDataInput in 反序列化.readFields in interface WritableIOExceptionpublic void write(DataOutput out) throws IOException
WritableDataOutput out.write in interface WritableIOExceptionpublic int compareTo(IntervalDayTimeWritable o)
compareTo in interface Comparable<IntervalDayTimeWritable>Copyright © 2021 Alibaba Cloud Computing. All rights reserved.