|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.basex.data.ExprInfo
org.basex.query.expr.Expr
org.basex.query.value.Value
org.basex.query.value.item.Item
org.basex.query.value.item.ADateDur
public abstract class ADateDur
Abstract super class for dates and durations.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary | |
---|---|
protected static java.math.BigDecimal |
BD100
BigDecimal: 100. |
protected static java.math.BigDecimal |
BD1000
BigDecimal: 1000. |
protected static java.math.BigDecimal |
BD146097
BigDecimal: 146097. |
protected static java.math.BigDecimal |
BD1461
BigDecimal: 1461. |
protected static java.math.BigDecimal |
BD153
BigDecimal: 153. |
protected static java.math.BigDecimal |
BD2
BigDecimal: 2. |
protected static java.math.BigDecimal |
BD3600
BigDecimal: 60. |
protected static java.math.BigDecimal |
BD365
BigDecimal: 365. |
protected static java.math.BigDecimal |
BD36524
BigDecimal: 36524. |
protected static java.math.BigDecimal |
BD36525
BigDecimal: 36525. |
protected static java.math.BigDecimal |
BD366
BigDecimal: 366. |
protected static java.math.BigDecimal |
BD4
BigDecimal: 4. |
protected static java.math.BigDecimal |
BD5
BigDecimal: 5. |
protected static java.math.BigDecimal |
BD60
BigDecimal: 60. |
static java.math.BigDecimal |
BDMAXLONG
Maximum long value. |
protected static java.math.BigDecimal |
DAYSECONDS
Seconds per day. |
java.math.BigDecimal |
sec
Seconds and milliseconds ( 0-59.\d+ ). |
Fields inherited from class org.basex.query.value.item.Item |
---|
score, UNDEF |
Fields inherited from class org.basex.query.value.Value |
---|
type |
Constructor Summary | |
---|---|
protected |
ADateDur(Type t)
Constructor. |
Method Summary | |
---|---|
protected QueryException |
dateErr(byte[] i,
java.lang.String ex,
InputInfo ii)
Throws a date format exception. |
abstract long |
day()
Returns the days. |
abstract long |
hou()
Returns the hours (0-23). |
abstract long |
min()
Returns the minutes (0-59). |
abstract long |
mon()
Returns the months. |
abstract java.math.BigDecimal |
sec()
Returns the seconds (0-59), including the fractional part. |
protected java.math.BigDecimal |
toDecimal(java.lang.String s,
boolean dur,
InputInfo ii)
Date and durations: converts the specified string to a decimal value. |
protected long |
toLong(java.lang.String s,
boolean dur,
InputInfo ii)
Date and durations: converts the specified string to an integer value. |
abstract long |
yea()
Returns the years. |
Methods inherited from class org.basex.query.value.item.Item |
---|
bool, castErr, comparable, dbl, dec, description, diff, ebv, eq, equiv, flt, hash, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, plan, score, score, size, string, test, type, typeId, writeTo, xdmInfo |
Methods inherited from class org.basex.query.value.Value |
---|
accept, cache, checkUp, compile, copy, count, data, exprSize, has, inline, isValue, iter, iterator, removable, serialize, toJava, value |
Methods inherited from class org.basex.query.expr.Expr |
---|
addText, compEbv, copy, hasFreeVars, indexAccessible, indexEquivalent, inlineAll, isEmpty, isFunction, isVacuous, markTailCalls, optimize, sameAs, uses, visitAll |
Methods inherited from class org.basex.data.ExprInfo |
---|
addPlan, addPlan, info, planAttr, planElem, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.math.BigDecimal BDMAXLONG
protected static final java.math.BigDecimal DAYSECONDS
protected static final java.math.BigDecimal BD146097
protected static final java.math.BigDecimal BD36525
protected static final java.math.BigDecimal BD36524
protected static final java.math.BigDecimal BD3600
protected static final java.math.BigDecimal BD1461
protected static final java.math.BigDecimal BD1000
protected static final java.math.BigDecimal BD366
protected static final java.math.BigDecimal BD365
protected static final java.math.BigDecimal BD153
protected static final java.math.BigDecimal BD100
protected static final java.math.BigDecimal BD60
protected static final java.math.BigDecimal BD5
protected static final java.math.BigDecimal BD4
protected static final java.math.BigDecimal BD2
public java.math.BigDecimal sec
0-59.\d+
). -1
: undefined.
Constructor Detail |
---|
protected ADateDur(Type t)
t
- data typeMethod Detail |
---|
public abstract long yea()
public abstract long mon()
public abstract long day()
public abstract long hou()
public abstract long min()
public abstract java.math.BigDecimal sec()
protected final QueryException dateErr(byte[] i, java.lang.String ex, InputInfo ii) throws QueryException
i
- inputex
- example formatii
- input info
QueryException
- query exceptionprotected long toLong(java.lang.String s, boolean dur, InputInfo ii) throws QueryException
s
- string to be converteddur
- durationii
- input info
QueryException
- query exceptionprotected java.math.BigDecimal toDecimal(java.lang.String s, boolean dur, InputInfo ii) throws QueryException
s
- string to be converteddur
- durationii
- input info
QueryException
- query exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |