Class Str

All Implemented Interfaces:
Iterable<Item>

public final class Str extends AStr
String item (xs:string, xs:normalizedString, xs:language, etc.).
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Field Details

    • EMPTY

      public static final Str EMPTY
      Zero-length string.
  • Constructor Details

    • Str

      public Str(byte[] value, AtomType type)
      Constructor.
      Parameters:
      value - value
      type - item type
  • Method Details

    • get

      public static Str get(byte[] value)
      Returns an instance of this class.
      Parameters:
      value - value
      Returns:
      instance
    • get

      public static Str get(String value)
      Returns an instance of this class.
      Parameters:
      value - string
      Returns:
      instance
    • get

      public static Str get(Object value, QueryContext qc, InputInfo inf) throws QueryException
      Returns a string representation of the specified value.
      Parameters:
      value - object (will be converted to token)
      qc - query context
      inf - input info
      Returns:
      instance
      Throws:
      QueryException - query exception
    • string

      public byte[] string(InputInfo ii)
      Description copied from class: Item
      Returns a string representation of the value.
      Specified by:
      string in class Item
      Parameters:
      ii - input info (can be null)
      Returns:
      string value
    • string

      public byte[] string()
      Returns the string value.
      Returns:
      string value
    • simplifyFor

      public Expr simplifyFor(CompileContext.Simplify mode, CompileContext cc)
      Description copied from class: Expr
      This function is called at compile time for expressions whose operands might be simplified.
      Overrides:
      simplifyFor in class Expr
      Parameters:
      mode - mode of simplification
      cc - compilation context
      Returns:
      simplified or original expression
      See Also:
    • toJava

      public String toJava()
      Description copied from class: Value
      Returns a Java representation of the value.
      Specified by:
      toJava in class Value
      Returns:
      Java object