public class Time
extends java.lang.Object
A time representing a specific point in a day, not tied to any specific date. The corresponding Java type is a java.util.Date where only hours, minutes, seconds, and milliseconds can be non-zero. This effectively makes it a point in time during the first day after the Unix epoch. The underlying representation is an integer representing the number of milliseconds after midnight.
Modifier and Type | Field | Description |
---|---|---|
static java.lang.String |
LOGICAL_NAME |
|
static Schema |
SCHEMA |
Constructor | Description |
---|---|
Time() |
Modifier and Type | Method | Description |
---|---|---|
static SchemaBuilder |
builder() |
Returns a SchemaBuilder for a Time.
|
static int |
fromLogical(Schema schema,
java.util.Date value) |
Convert a value from its logical format (Time) to it's encoded format.
|
static java.util.Date |
toLogical(Schema schema,
int value) |
public static final java.lang.String LOGICAL_NAME
public static final Schema SCHEMA
public static SchemaBuilder builder()
public static int fromLogical(Schema schema, java.util.Date value)
value
- the logical valuepublic static java.util.Date toLogical(Schema schema, int value)