org.basex.query.item
Class DTd

java.lang.Object
  extended by org.basex.query.ExprInfo
      extended by org.basex.query.expr.Expr
          extended by org.basex.query.item.Item
              extended by org.basex.query.item.Dur
                  extended by org.basex.query.item.DTd

public final class DTd
extends Dur

DayTime Duration item.

Author:
Workgroup DBIS, University of Konstanz 2005-10, ISC License, Christian Gruen

Nested Class Summary
 
Nested classes/interfaces inherited from class org.basex.query.expr.Expr
Expr.Use
 
Field Summary
 
Fields inherited from class org.basex.query.item.Item
score, type
 
Constructor Summary
DTd(Date dat, Date sub)
          Constructor.
DTd(DTd it, DTd a, boolean p)
          Constructor.
DTd(Dur it, double f, boolean m)
          Constructor.
DTd(int shift)
          Timezone constructor.
 
Method Summary
 int diff(Item it)
          Returns the difference between the current and the specified item.
 BigDecimal dtd()
          Returns the date and time.
 int hashCode()
           
 byte[] str()
          Returns an atomized string.
 
Methods inherited from class org.basex.query.item.Dur
day, eq, hou, java, min, mon, sec, tim, toString, yea
 
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
 
Methods inherited from class org.basex.query.expr.Expr
addText, checkCtx, checkDbl, checkItr, e, indexAccessible, indexEquivalent, remove, sameAs, v
 
Methods inherited from class org.basex.query.ExprInfo
color, info
 
Methods inherited from class java.lang.Object
equals, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DTd

public DTd(int shift)
Timezone constructor.

Parameters:
shift - shift value

DTd

public DTd(DTd it,
           DTd a,
           boolean p)
Constructor.

Parameters:
it - duration item
a - duration to be added/subtracted
p - plus/minus flag

DTd

public DTd(Dur it,
           double f,
           boolean m)
    throws QueryException
Constructor.

Parameters:
it - duration item
f - factor
m - multiplication flag
Throws:
QueryException - query exception

DTd

public DTd(Date dat,
           Date sub)
Constructor.

Parameters:
dat - date item
sub - date to be subtracted
Method Detail

dtd

public BigDecimal dtd()
Returns the date and time.

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