Package | Description |
---|---|
ch.agent.t2 |
Provides error message and exception support and encapsulates a
resource bundle with error messages.
|
ch.agent.t2.applied |
Ready to use time domains and a time domain catalog implemented with the ch.agent.t2.time API.
|
ch.agent.t2.time |
Defines and implements time and time domains.
|
ch.agent.t2.timeseries |
Defines and implements time series.
|
ch.agent.t2.timeutil |
Non-essential behavior useful for working with dates, times and time series.
|
Modifier and Type | Method and Description |
---|---|
static T2Exception |
T2Msg.exception(String key,
Object... arg) |
static T2Exception |
T2Msg.exception(Throwable cause,
String key,
Object... arg) |
Modifier and Type | Method and Description |
---|---|
long |
DayRankingSubPeriodPattern.adjustForSubPeriod(long time,
Adjustment adjust,
TimeParts tp) |
long |
SimpleSubPeriodPattern.adjustForSubPeriod(long time,
Adjustment adjust,
TimeParts tp) |
protected void |
DayByNameAndRank.checkRank(int rank,
Resolution unit)
Verify the validity of the rank for the given resolution.
|
protected int |
DayByNameAndRank.getMaxRank(Resolution unit)
Return the maximum rank even if it is not always achievable.
|
Constructor and Description |
---|
DateTime(long year,
int month,
int day,
int hour,
int min,
int sec)
Construct a
datetimetime from the given time components. |
DateTime(String date)
Construct a
datetimetime from a string. |
DateTime(TimeIndex time)
Construct a
datetimetime from another time object. |
Month(long year,
int month)
Construct a
monthlytime from the given time components. |
Month(String date)
Construct a
monthlytime from a string. |
Month(TimeIndex time)
Construct a
monthlytime from another time object. |
SystemTime()
Constructs the current time in the
systemtimedomain. |
SystemTime(long year,
int month,
int day,
int hour,
int min,
int sec,
int msec)
Construct a
systemtimetime from the given time components. |
SystemTime(String date)
Construct a
systemtimetime from a string. |
SystemTime(TimeIndex time)
Construct a
systemtimetime from another time object. |
ThirdFriday(long year,
int month)
Construct a
friday3time from the given time components. |
ThirdFriday(String date,
Adjustment adjust)
Construct a
friday3time from a string. |
ThirdFriday(TimeIndex time)
Construct a
friday3time from another time object. |
Week(long year,
int month,
int day,
Adjustment adjust)
Construct a
weeklytime from the given time components. |
Week(String date,
Adjustment adjust)
Construct a
weeklytime from a string. |
Week(TimeIndex time)
Construct a
weeklytime from another time object. |
Workday(long year,
int month,
int day,
Adjustment adjust)
Construct a
workweektime from the given time components. |
Workday(String date)
Construct a
workweektime from a string. |
Workday(String date,
Adjustment adjust)
Construct a
workweektime from a string. |
Workday(TimeIndex time)
Construct a
workweektime from another time object. |
Year(long year)
Construct a
yearlytime from the given time components. |
Year(String date)
Construct a
yearlytime from a string. |
Year(TimeIndex time)
Construct a
yearlytime from another time object. |
Modifier and Type | Method and Description |
---|---|
TimeIndex |
Time2.add(long increment) |
TimeIndex |
TimeIndex.add(long increment)
Return a new time index with the time incremented from this one.
|
long |
SubPeriodPattern.adjustForSubPeriod(long time,
Adjustment adjust,
TimeParts timeParts)
Modify and return the numeric time index corresponding to the state of the
time parts argument.
|
int |
Time2.asOffset() |
int |
TimeIndex.asOffset()
Return the time as an offset from the origin.
|
TimeIndex |
Time2.convert(TimeDomain domain) |
TimeIndex |
TimeIndex.convert(TimeDomain domain)
Return a new time index by converting this one to the given time domain.
|
TimeIndex |
Time2.convert(TimeDomain domain,
Adjustment adjustment) |
TimeIndex |
TimeIndex.convert(TimeDomain domain,
Adjustment adjustment)
Return a new time index by converting this one to the given time domain,
possibly adjusting the time as specified.
|
Range |
Range.convert(TimeDomain domain,
Adjustment adjust)
Convert the range to the domain specified.
|
static long |
TimeTools.dayIndex(Resolution unit,
long time)
Return the day index computed from the uncompressed numerical time.
|
TimeDomain |
TimeDomainCatalog.get(String label)
Return the time domain with the given label.
|
TimeDomain |
ImmutableTimeDomainCatalog.get(String label) |
static int |
TimeTools.getDayByRank(long year,
int month,
DayOfWeek name,
int rank)
Return the day number of the month or of the year given the day's name and rank.
|
TimeIndex |
Time2.getDayByRank(Resolution basePeriod,
DayOfWeek day,
int rank) |
TimeIndex |
TimeIndex.getDayByRank(Resolution referencePeriod,
DayOfWeek day,
int rank)
Return the TimeIndex for a day defined by name and rank within a reference period.
|
static Day |
TimeTools.getDayOfMonthByRank(TimeIndex time,
DayOfWeek dayName,
int rank)
Return the TimeIndex for the day defined by name and rank within the
month of the indicated date.
|
DayOfWeek |
Time2.getDayOfWeek() |
DayOfWeek |
TimeIndex.getDayOfWeek()
Return the day of the week.
|
static DayOfWeek |
TimeTools.getDayOfWeek(Resolution unit,
long time)
Return the day of week for the given unit and uncompressed time index.
|
DayOfWeek |
TimePacker.getDayOfWeek(TimeIndex time)
Return the day of week for the given time.
|
DayOfWeek |
TimeFactory.getDayOfWeek(TimeIndex time) |
static Day |
TimeTools.getDayOfYearByRank(TimeIndex time,
DayOfWeek dayName,
int rank)
Return the TimeIndex for the day defined by name and rank within the year
of the indicated date.
|
int |
Range.getSizeAsInt()
Get the size of the range as an integer and check for overflow.
|
Range |
Range.intersection(Range range)
Return a new range which is the intersection with the argument.
|
boolean |
Range.isInRange(Range range)
Return true if another range is within range.
|
boolean |
Range.isInRange(TimeIndex time)
Return true if the time is within range.
|
boolean |
Day.isWeekEnd()
Return true if the day falls on a weekend.
|
long |
BasePeriodPattern.makeIndex(long time)
Compress an unrestricted numerical time index by removing all OFF time points.
|
long |
Cycle.makeIndex(long time) |
static long |
TimeTools.makeRawIndex(Resolution unit,
TimeParts tp)
Return a long number representing a time parts object.
|
long |
TimePacker.pack(TimeParts timeParts,
Adjustment adjust)
Pack the component elements of the time into a numeric time index.
|
long |
TimeFactory.pack(TimeParts tp,
Adjustment adjust) |
void |
TimeDomain.requireEquality(TimeDomain domain)
Throw an exception if the domain is not equal to this domain.
|
void |
TimeFactory.requireEquality(TimeDomain domain) |
TimeParts |
DefaultTimeScanner.scan(Resolution unit,
String datetime) |
TimeParts |
TimeScanner.scan(Resolution unit,
String datetime)
Scan the date string into a time parts object.
|
TimeParts |
TimeFactory.scan(Resolution unit,
String time) |
long |
Time2.sub(TimeIndex time) |
long |
TimeIndex.sub(TimeIndex time)
Return the number of time units since the time specified as argument.
|
TimeIndex |
TimeDomain.time(long year,
int month,
int day,
int hour,
int min,
int sec,
int usec,
Adjustment adjust)
Return a new TimeIndex corresponding to the list of parameters.
|
TimeIndex |
TimeFactory.time(long year,
int month,
int day,
int hour,
int min,
int sec,
int usec,
Adjustment adjust) |
TimeIndex |
TimeDomain.time(String date)
Return a new TimeIndex corresponding to the given date string.
|
TimeIndex |
TimeFactory.time(String date) |
TimeIndex |
TimeDomain.time(String date,
Adjustment adjust)
Return a new TimeIndex corresponding to the given date string.
|
TimeIndex |
TimeFactory.time(String date,
Adjustment adjust) |
Range |
Range.union(Range range)
Return a new range which is the union with the argument.
|
boolean |
TimePacker.valid(long time,
boolean testOnly)
Return true if the numeric time index is valid for the domain.
|
boolean |
TimeFactory.valid(long t,
boolean testOnly) |
Constructor and Description |
---|
Day(long year,
int month,
int day)
Construct a
dailytime from the given time components. |
Day(String date)
Construct a
dailytime from a string. |
Day(TimeIndex time)
Construct a
dailytime from another time object. |
Range(TimeDomain domain,
String firstDate,
String lastDate,
Adjustment adjust)
Construct a range with bounds specified as date strings.
|
Range(TimeIndex first,
TimeIndex last)
Construct a range with bounds specified as times.
|
Time2(TimeDomain domain,
long year,
int month,
int day,
int hour,
int min,
int sec,
int fsec,
Adjustment adjust)
Construct a time index with the given time domain and parameters.
|
Time2(TimeDomain domain,
String time)
Construct a time index with the given time domain and string.
|
Time2(TimeDomain domain,
String time,
Adjustment adjustment)
Construct a time index with the given time domain and string, with possible
adjustment.
|
Time2(TimeDomain domain,
TimeParts timeParts,
Adjustment adjust)
Constructor a time index from a time parts object with an adjustment
parameter.
|
TimeZoneOffset(Resolution unit,
boolean negative,
int hour,
int min,
int sec,
int fsec)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected int |
AbstractTimeSeries.accept(TimeAddressable<T> updates,
UpdateReviewer<T> reviewer)
Return the number of updates rejected by the reviewer.
|
TimeIndexable<T> |
RegularTimeSeries.asIndexable() |
TimeIndexable<T> |
SparseTimeSeries.asIndexable() |
TimeIndexable<T> |
TimeAddressable.asIndexable()
Return an indexable time series corresponding to this one.
|
TimeAddressable<T> |
AbstractTimeSeries.copy() |
TimeIndexable<T> |
RegularTimeSeries.copy() |
TimeAddressable<T> |
TimeAddressable.copy()
Return a copy of the time series.
|
TimeIndexable<T> |
TimeIndexable.copy() |
int |
RegularTimeSeries.fill(Filler<T> interpolator) |
int |
TimeIndexable.fill(Filler<T> filler)
Fill holes using the given procedure.
|
int |
RegularTimeSeries.fill(T replacement,
long tailLength) |
int |
TimeIndexable.fill(T replacement,
long tailLength)
Fill holes in the time series with the given value and append a
tail of the given length.
|
T |
AbstractTimeSeries.get(long t) |
T |
TimeAddressable.get(long index)
Return the value at the given numerical time index.
|
abstract TimeAddressable<T> |
AbstractTimeSeries.get(long first,
long last) |
TimeAddressable<T> |
RegularTimeSeries.get(long first,
long last) |
TimeAddressable<T> |
TimeAddressable.get(long first,
long last)
Return a new time series corresponding to the range between two numerical time indexes.
|
TimeAddressable<T> |
RegularTimeSeries.get(Range range) |
TimeAddressable<T> |
SparseTimeSeries.get(Range range) |
TimeAddressable<T> |
TimeAddressable.get(Range range)
Return a time series constructed from the given range of this series.
|
T |
AbstractTimeSeries.get(TimeIndex t) |
T |
TimeAddressable.get(TimeIndex time)
Return the value identified by the given time index.
|
T[] |
RegularTimeSeries.getArray(Range range) |
T[] |
TimeIndexable.getArray(Range range)
Return a subrange of values in an array.
|
Observation<T> |
AbstractTimeSeries.getFirst(TimeIndex t) |
Observation<T> |
TimeAddressable.getFirst(TimeIndex time)
Return the observation at or after the given time.
|
Observation<T> |
AbstractTimeSeries.getLast(TimeIndex t) |
Observation<T> |
TimeAddressable.getLast(TimeIndex time)
Return the observation at or before the given time.
|
protected abstract T |
AbstractTimeSeries.internalGet(long time)
Get the value identified by the given numerical time index.
|
protected T |
RegularTimeSeries.internalGet(long index) |
protected T |
SparseTimeSeries.internalGet(long index) |
protected abstract Observation<T> |
AbstractTimeSeries.internalGetFirst(long index)
Return the observation at or after the given numerical time index.
|
protected Observation<T> |
RegularTimeSeries.internalGetFirst(long index) |
protected Observation<T> |
SparseTimeSeries.internalGetFirst(long index) |
protected abstract Observation<T> |
AbstractTimeSeries.internalGetLast(long time)
Return the observation at or before the given numerical time index.
|
protected Observation<T> |
RegularTimeSeries.internalGetLast(long index) |
protected Observation<T> |
SparseTimeSeries.internalGetLast(long index) |
protected abstract void |
AbstractTimeSeries.internalPut(long time,
T value)
Put the value into the series at the given numerical time index.
|
protected void |
RegularTimeSeries.internalPut(long index,
T value) |
protected void |
SparseTimeSeries.internalPut(long index,
T value) |
protected abstract void |
AbstractTimeSeries.internalRemove(long time)
Remove the value at the given numerical time index.
|
protected void |
RegularTimeSeries.internalRemove(long index) |
protected void |
SparseTimeSeries.internalRemove(long index) |
protected abstract void |
AbstractTimeSeries.internalSetBounds(long first,
long last)
Shrink the range to the one given by the two numerical time indexes.
|
protected void |
RegularTimeSeries.internalSetBounds(long first,
long last) |
protected void |
SparseTimeSeries.internalSetBounds(long first,
long last) |
protected T |
AbstractTimeSeries.normalizeMissingValue(T value)
Replace all objects equal to the missing value with the "official"
missing value object.
|
void |
AbstractTimeSeries.put(long index,
T value) |
void |
TimeAddressable.put(long time,
T value)
Put a value identified by a numerical time index into the time series.
|
void |
AbstractTimeSeries.put(long index,
T[] values) |
void |
RegularTimeSeries.put(long index,
T[] values) |
void |
TimeAddressable.put(long time,
T[] values)
Put an array of values identified with the numerical time index of its
first element into the time series.
|
void |
AbstractTimeSeries.put(TimeAddressable<T> values,
UpdateReviewer<T> reviewer) |
void |
RegularTimeSeries.put(TimeAddressable<T> values,
UpdateReviewer<T> reviewer) |
void |
TimeAddressable.put(TimeAddressable<T> values,
UpdateReviewer<T> reviewer)
Conditionally put all values from another time series into this time series.
|
void |
AbstractTimeSeries.put(TimeIndex t,
T value) |
void |
TimeAddressable.put(TimeIndex time,
T value)
Put a value identified by a time index into the time series.
|
void |
AbstractTimeSeries.put(TimeIndex t,
T[] values) |
void |
TimeAddressable.put(TimeIndex time,
T[] values)
Put an array of values identified with time index of its first element
into the time series.
|
void |
AbstractTimeSeries.remove(TimeIndex t) |
void |
TimeAddressable.remove(TimeIndex time)
Remove the value identified by the time index.
|
boolean |
AbstractTimeSeries.setRange(Range range) |
boolean |
TimeAddressable.setRange(Range range)
Set the range to the intersection of the current range with the given range.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
DayExpression.enforceValidRange(TimeDomain domain,
DayExpression begin,
boolean keepBegin)
Enforce a valid range between the given day expression and this
expression.
|
static TimeIndex |
JavaDateUtil.fromJavaDate(Date date,
TimeDomain domain)
Convert a Java Date to a TimeIndex in a given domain.
|
static TimeIndex |
JavaDateUtil.fromJavaDate(Date date,
TimeDomain domain,
Adjustment adjustment,
boolean UTC)
Convert a Java Date to a TimeIndex in a given domain, with tuning parameters.
|
TimeIndex |
DateHolder.getDate()
Return the date evaluated in the time domain of the value holder.
|
TimeIndex |
DayExpression.getDate(Range context)
Resolve the expression in the context of the given range and return the
result as a time index.
|
TimeIndex |
DateHolder.getDate(Range context)
Return the date evaluated in the context of the given range.
|
TimeIndex |
DayExpression.getDate(TimeDomain domain)
Resolve the expression in the given time domain and return the result as
a time index.
|
Range |
RangeHolder.getRange()
Get the range evaluated in the time domain of the range holder.
|
Range |
RangeHolder.getRange(Range context)
Get the range evaluated in the context of the given range.
|
Range |
RangeHolder.getRange(TimeDomain context)
Get the range evaluated in the context of the given domain.
|
void |
DayExpression.incr(int increment)
Add the given increment to the expression.
|
void |
RangeHolder.incrBegin(boolean up,
boolean large)
Increase or decrease the beginning of the range by a unit or by a large amount.
|
void |
RangeHolder.incrBegin(int increment)
Increment the beginning of the range by the given amount.
|
void |
DateHolder.incrDate(boolean up,
boolean large)
Increase or decrease the date by a unit or by a large amount.
|
void |
DateHolder.incrDate(int increment)
Increment the date by the given amount.
|
void |
RangeHolder.incrEnd(boolean up,
boolean large)
Increase or decrease the end of the range by a unit or by a large amount.
|
void |
RangeHolder.incrEnd(int increment)
Increment the end of the range by the given amount.
|
static Day |
DayExpression.parseDay(String expr)
Parse the expression as a date in the daily calendar and returns it as a
Day . |
static TimeIndex |
DayExpression.parseDay(String expr,
TimeDomain domain,
Adjustment adjustment)
Parse the expression as a date in the daily calendar and returns it as a TimeIndex
in the domain requested, adjusted as indicated.
|
void |
RangeHolder.reset(TimeDomain domain)
Change the time domain of the range holder.
|
void |
DateHolder.reset(TimeDomain domain)
Change the time domain.
|
TimeIndex |
DateTimeScanner.scan(String date)
Scan the date using the default domain.
|
TimeIndex |
DateTimeScanner.scan(TimeDomain domain,
String date)
Scan the date in the given time domain.
|
void |
RangeHolder.setBegin(String date)
Set the date for the range beginning.
|
void |
DateHolder.setDate(String date)
Set the date.
|
void |
RangeHolder.setEnd(String date)
Set the date for the range end.
|
void |
DayExpression.setExpression(TimeDomain domain,
String expression)
Set the domain and the expression.
|
static Date |
JavaDateUtil.toJavaDate(TimeIndex t)
Return the Java date corresponding to the given time index.
|
Constructor and Description |
---|
DateTimeScanner(String pattern,
int[] groups)
Construct a date time scanner with the given pattern and groups.
|
Copyright © 2017. All rights reserved.