|
||||||||||
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
org.basex.query.value.item.Dur
public class Dur
Duration item (xs:duration
).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
---|
Expr.Flag |
Field Summary | |
---|---|
protected static java.lang.String |
DP
Pattern for one or more digits. |
Fields inherited from class org.basex.query.value.item.ADateDur |
---|
BD100, BD1000, BD146097, BD1461, BD153, BD2, BD3600, BD365, BD36524, BD36525, BD366, BD4, BD5, BD60, BDMAXLONG, DAYSECONDS, sec |
Fields inherited from class org.basex.query.value.item.Item |
---|
score, UNDEF |
Fields inherited from class org.basex.query.value.Value |
---|
type |
Constructor Summary | |
---|---|
Dur(byte[] v,
InputInfo ii)
Constructor. |
|
Dur(Dur d)
Constructor. |
Method Summary | |
---|---|
protected void |
date(TokenBuilder tb)
Adds the date to the specified token builder. |
long |
day()
Returns the days. |
protected void |
dayTime(byte[] vl,
java.util.regex.Matcher mt,
int p,
InputInfo ii)
Initializes the dayTime component. |
int |
diff(Item it,
Collation coll,
InputInfo ii)
Returns the difference between the current and the specified item. |
boolean |
eq(Item it,
Collation coll,
InputInfo ii)
Checks the items for equality. |
int |
hash(InputInfo ii)
Returns a hash code for this value. |
long |
hou()
Returns the hours (0-23). |
long |
min()
Returns the minutes (0-59). |
long |
mon()
Returns the months. |
java.math.BigDecimal |
sec()
Returns the seconds (0-59), including the fractional part. |
byte[] |
string(InputInfo ii)
Returns a string representation of the value. |
protected void |
time(TokenBuilder tb)
Adds the time to the specified token builder. |
javax.xml.datatype.Duration |
toJava()
Returns a Java representation of the value. |
java.lang.String |
toString()
|
long |
yea()
Returns the years. |
protected void |
yearMonth(byte[] vl,
java.util.regex.Matcher mt,
InputInfo ii)
Initializes the yearMonth component. |
Methods inherited from class org.basex.query.value.item.ADateDur |
---|
dateErr, toDecimal, toLong |
Methods inherited from class org.basex.query.value.item.Item |
---|
bool, castErr, comparable, dbl, dec, description, ebv, equiv, flt, homogeneous, input, isItem, item, itemAt, iter, iterable, itr, materialize, plan, score, score, size, 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, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final java.lang.String DP
Constructor Detail |
---|
public Dur(byte[] v, InputInfo ii) throws QueryException
v
- valueii
- input info
QueryException
- query exceptionpublic Dur(Dur d)
d
- durationMethod Detail |
---|
protected void yearMonth(byte[] vl, java.util.regex.Matcher mt, InputInfo ii) throws QueryException
vl
- valuemt
- matcherii
- input info
QueryException
- query exceptionprotected void dayTime(byte[] vl, java.util.regex.Matcher mt, int p, InputInfo ii) throws QueryException
vl
- valuemt
- matcherp
- first matching positionii
- input info
QueryException
- query exceptionpublic final long yea()
ADateDur
yea
in class ADateDur
public final long mon()
ADateDur
mon
in class ADateDur
public final long day()
ADateDur
day
in class ADateDur
public final long hou()
ADateDur
hou
in class ADateDur
public final long min()
ADateDur
min
in class ADateDur
public final java.math.BigDecimal sec()
ADateDur
sec
in class ADateDur
public byte[] string(InputInfo ii)
Item
string
in class Item
ii
- input info, use null
if none is available
protected final void date(TokenBuilder tb)
tb
- token builderprotected final void time(TokenBuilder tb)
tb
- token builderpublic final boolean eq(Item it, Collation coll, InputInfo ii) throws QueryException
Item
eq
in class Item
it
- item to be comparedcoll
- collationii
- input info
QueryException
- query exceptionpublic int diff(Item it, Collation coll, InputInfo ii) throws QueryException
Item
diff
in class Item
it
- item to be comparedcoll
- query contextii
- input info
QueryException
- query exceptionpublic final javax.xml.datatype.Duration toJava()
Value
toJava
in class Value
public final int hash(InputInfo ii)
Value
hash
in class Item
ii
- input info
public final java.lang.String toString()
toString
in class ExprInfo
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |