org.basex.query.item
Class YMd
java.lang.Object
org.basex.query.ExprInfo
org.basex.query.expr.Expr
org.basex.query.item.Item
org.basex.query.item.Dur
org.basex.query.item.YMd
public final class YMd
- extends Dur
YearMonth Duration item.
- Author:
- Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen
Nested classes/interfaces inherited from class org.basex.query.expr.Expr |
Expr.Use |
Fields inherited from class org.basex.query.item.Item |
score, type |
Constructor Summary |
YMd(Dur it,
double f,
boolean m)
Constructor. |
YMd(YMd it,
YMd a,
boolean p)
Constructor. |
Method Summary |
int |
diff(Item it)
Returns the difference between the current and the specified item. |
int |
hashCode()
|
byte[] |
str()
Returns an atomized string. |
int |
ymd()
Returns the years and months. |
Methods inherited from class org.basex.query.item.Item |
atomic, bool, comp, d, dbl, dec, duplicates, ebv, flt, i, iter, iter, itr, n, name, node, plan, removable, returned, s, score, score, serialize, size, test, u, uses |
YMd
public YMd(YMd it,
YMd a,
boolean p)
- Constructor.
- Parameters:
it
- duration itema
- duration to be added/subtractedp
- plus/minus flag
YMd
public YMd(Dur it,
double f,
boolean m)
throws QueryException
- Constructor.
- Parameters:
it
- duration itemf
- factorm
- multiplication/division flag
- Throws:
QueryException
- query exception
ymd
public int ymd()
- Returns the years and months.
- Returns:
- year
str
public byte[] str()
- Description copied from class:
Item
- Returns an atomized string.
- Overrides:
str
in class Dur
- Returns:
- string representation
diff
public int diff(Item it)
throws QueryException
- Description copied from class:
Item
- Returns the difference between the current and the specified item.
- Overrides:
diff
in class Dur
- Parameters:
it
- item to be compared
- Returns:
- difference
- Throws:
QueryException
- query exception
hashCode
public int hashCode()
- Overrides:
hashCode
in class Dur