public class DateTimeValue extends AbstractValue
| Modifier and Type | Field and Description |
|---|---|
protected Calendar |
cal |
int |
fractionalSecs |
static int |
MONTH_MULTIPLICATOR |
int |
monthDay |
boolean |
normalized |
protected DateTimeValue |
normalizedDateTimeValue |
static int |
NUMBER_BITS_MONTHDAY |
static int |
NUMBER_BITS_TIME |
static int |
NUMBER_BITS_TIMEZONE |
boolean |
presenceFractionalSecs |
boolean |
presenceTimezone |
int |
time |
int |
timezone |
static int |
TIMEZONE_OFFSET_IN_MINUTES |
DateTimeType |
type |
int |
year |
static int |
YEAR_OFFSET |
slen, valueType| Constructor and Description |
|---|
DateTimeValue(DateTimeType type,
int year,
int monthDay,
int time,
int fractionalSecs,
boolean presenceTimezone,
int timezone) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
_equals(DateTimeValue o) |
protected static void |
checkCharacter(StringBuilder sb,
char c) |
protected DateTimeValue |
doNormalize() |
boolean |
equals(Object o) |
protected int |
fQuotient(int a,
int b) |
protected int |
fQuotient(int temp,
int low,
int high) |
void |
getCharacters(char[] cbuffer,
int offset)
Fills character array with the value represented as String
|
int |
getCharactersLength()
Length of string representation
|
static int |
getMonthDay(Calendar cal)
Returns monthDay representation defined in the EXI format (Month * 32 +
Day)
|
static int |
getTime(Calendar cal)
Returns time representation defined in the EXI format ((Hour * 64) +
Minutes) * 64 + seconds
|
protected static int |
getTimeZoneInMillisecs(int minutes)
Returns time-zone offset in millisecs according to the given minutes
|
protected static int |
getTimeZoneInMinutesOffset(Calendar cal)
Returns time-zone in minutes offset
|
int |
hashCode() |
protected int |
maximumDayInMonthFor(int year,
int month) |
protected int |
modulo(int a,
int b) |
protected int |
modulo(int a,
int low,
int high) |
DateTimeValue |
normalize() |
static DateTimeValue |
parse(Calendar cal,
DateTimeType type)
Encode Date-Time as a sequence of values representing the individual
components of the Date-Time.
|
static DateTimeValue |
parse(String cal,
DateTimeType type) |
protected static int |
parseDay(StringBuilder sb) |
protected static int |
parseMonth(StringBuilder sb) |
protected static int |
parseMonthDay(StringBuilder sb) |
protected static int |
parseTime(StringBuilder sb) |
protected static int |
parseYear(StringBuilder sb) |
protected static void |
setMonthDay(int monthDay,
Calendar cal)
Sets month and day of the given calendar making use of of the monthDay
representation defined in EXI format
|
protected static void |
setTime(int time,
Calendar cal)
Sets hour, minute and second of the given calendar making use of of the
time representation defined in EXI format
|
Calendar |
toCalendar() |
getCharacters, getValueType, toString, toStringpublic static final int NUMBER_BITS_MONTHDAY
public static final int NUMBER_BITS_TIME
public static final int NUMBER_BITS_TIMEZONE
public static final int YEAR_OFFSET
public static final int TIMEZONE_OFFSET_IN_MINUTES
public static final int MONTH_MULTIPLICATOR
public final DateTimeType type
public final int year
public final int monthDay
public final int time
public final boolean presenceFractionalSecs
public final int fractionalSecs
public final boolean presenceTimezone
public final int timezone
public final boolean normalized
protected Calendar cal
protected DateTimeValue normalizedDateTimeValue
public DateTimeValue(DateTimeType type, int year, int monthDay, int time, int fractionalSecs, boolean presenceTimezone, int timezone)
public static DateTimeValue parse(String cal, DateTimeType type)
protected static int parseYear(StringBuilder sb)
protected static void checkCharacter(StringBuilder sb, char c) throws XMLParsingException
XMLParsingExceptionprotected static int parseMonth(StringBuilder sb)
protected static int parseDay(StringBuilder sb)
protected static int parseMonthDay(StringBuilder sb) throws XMLParsingException
XMLParsingExceptionprotected static int parseTime(StringBuilder sb) throws XMLParsingException
XMLParsingExceptionpublic static DateTimeValue parse(Calendar cal, DateTimeType type)
cal - calendartype - date-time typepublic static int getMonthDay(Calendar cal)
cal - calendarpublic static int getTime(Calendar cal)
cal - calendarpublic Calendar toCalendar()
protected static void setMonthDay(int monthDay,
Calendar cal)
monthDay - monthDaycal - calendarprotected static void setTime(int time,
Calendar cal)
time - timecal - calendarprotected static int getTimeZoneInMinutesOffset(Calendar cal)
cal - calendarprotected static int getTimeZoneInMillisecs(int minutes)
minutes - minutespublic int getCharactersLength()
Valuepublic void getCharacters(char[] cbuffer,
int offset)
Valuecbuffer - character bufferoffset - character buffer offsetprotected final boolean _equals(DateTimeValue o)
public DateTimeValue normalize()
protected DateTimeValue doNormalize()
protected int fQuotient(int a,
int b)
protected int fQuotient(int temp,
int low,
int high)
protected int modulo(int a,
int b)
protected int modulo(int a,
int low,
int high)
protected int maximumDayInMonthFor(int year,
int month)
Copyright © 2018 Siemens AG. All rights reserved.