Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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 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
`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.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

### YMd

    public YMd(YMd it,
               YMd a,
               boolean p)

  Constructor.

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

### YMd

    public YMd(Dur it,
               double f,
               boolean m)
        throws QueryException

  Constructor.

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

Method Detail

### 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`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD