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 Str

    java.lang.Object
      org.basex.query.ExprInfo
          org.basex.query.expr.Expr
              org.basex.query.item.Item
                  org.basex.query.item.Str

Direct Known Subclasses:
  Atm, NCN, Uri

    public class Str

extends Item

String 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
`boolean` | `direct` Direct parser creation (needed for QName types).
`static Str` | `ZERO` String data.

Fields inherited from class org.basex.query.item.Item
`score, type`

Constructor Summary
`Str(byte[] v, boolean d)` Constructor.

Method Summary
`boolean` | `bool()` Returns a boolean representation of the item.
`double` | `dbl()` Returns a double representation of the item.
`BigDecimal` | `dec()` Returns a decimal representation of the item.
`int` | `diff(Item it)` Returns the difference between the current and the specified item.
`boolean` | `eq(Item it)` Checks the items for equality.
`float` | `flt()` Returns a float representation of the item.
`static Str` | `get(byte[] v)` Returns an instance of this class.
`static Str` | `get(Object v)` Returns an instance of this class.
`long` | `itr()` Returns an integer (long) representation of the item.
`byte[]` | `str()` Returns an atomized string.
`String` | `toString()`

Methods inherited from class org.basex.query.item.Item
`atomic, comp, d, duplicates, ebv, hashCode, i, iter, iter, java, 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`

Field Detail

### ZERO

    public static final Str ZERO

  String data.

### direct

    public boolean direct

  Direct parser creation (needed for QName types).

Constructor Detail

### Str

    public Str(byte[] v,
               boolean d)

  Constructor.

  Parameters:
    `v` - value
    `d` - direct flag

Method Detail

### get

    public static Str get(byte[] v)

  Returns an instance of this class.

  Parameters:
    `v` - value
  Returns:
    instance

### get

    public static Str get(Object v)

  Returns an instance of this class.

  Parameters:
    `v` - object (will be converted to token)
  Returns:
    instance

### str

    public final byte[] str()

  Description copied from class: `Item`
  Returns an atomized string.

  Overrides:
    `str` in class `Item`
  Returns:
    string representation

### bool

    public final boolean bool()

  Description copied from class: `Item`
  Returns a boolean representation of the item.

  Overrides:
    `bool` in class `Item`
  Returns:
    boolean value

### itr

    public final long itr()
                   throws QueryException

  Description copied from class: `Item`
  Returns an integer (long) representation of the item.

  Overrides:
    `itr` in class `Item`
  Returns:
    long value
  Throws:
    `QueryException` - query exception

### flt

    public final float flt()
                    throws QueryException

  Description copied from class: `Item`
  Returns a float representation of the item.

  Overrides:
    `flt` in class `Item`
  Returns:
    float value
  Throws:
    `QueryException` - query exception

### dbl

    public final double dbl()
                     throws QueryException

  Description copied from class: `Item`
  Returns a double representation of the item.

  Overrides:
    `dbl` in class `Item`
  Returns:
    double value
  Throws:
    `QueryException` - query exception

### dec

    public final BigDecimal dec()
                         throws QueryException

  Description copied from class: `Item`
  Returns a decimal representation of the item.

  Overrides:
    `dec` in class `Item`
  Returns:
    decimal value
  Throws:
    `QueryException` - query exception

### eq

    public boolean eq(Item it)
               throws QueryException

  Description copied from class: `Item`
  Checks the items for equality.

  Specified by:
    `eq` in class `Item`
  Parameters:
    `it` - item to be compared
  Returns:
    result of check
  Throws:
    `QueryException` - query exception

### 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 `Item`
  Parameters:
    `it` - item to be compared
  Returns:
    difference
  Throws:
    `QueryException` - query exception

### toString

    public final String toString()

  Overrides:
    `toString` in class `Item`

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