public class TimeRange
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
TimeRange.Builder
Builder for
TimeRange . |
static class |
TimeRange.Serializer
For internal use only.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Date |
endTime |
protected java.util.Date |
startTime |
Constructor and Description |
---|
TimeRange()
Time range.
|
TimeRange(java.util.Date startTime,
java.util.Date endTime)
Time range.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.util.Date |
getEndTime()
Optional ending time (exclusive).
|
java.util.Date |
getStartTime()
Optional starting time (inclusive).
|
int |
hashCode() |
static TimeRange.Builder |
newBuilder()
Returns a new builder for creating an instance of this class.
|
java.lang.String |
toString() |
java.lang.String |
toStringMultiline()
Returns a String representation of this object formatted for easier
readability.
|
protected final java.util.Date startTime
protected final java.util.Date endTime
public TimeRange(java.util.Date startTime, java.util.Date endTime)
Use newBuilder
to create instances of this class without
specifying values for all optional fields.
startTime
- Optional starting time (inclusive).endTime
- Optional ending time (exclusive).public TimeRange()
The default values for unset fields will be used.
public java.util.Date getStartTime()
null
if not present.public java.util.Date getEndTime()
null
if not present.public static TimeRange.Builder newBuilder()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toStringMultiline()
The returned String may contain newlines.