Class ExprType

java.lang.Object
org.basex.query.value.type.ExprType

public final class ExprType extends Object
Expression type, including a sequence type and result size.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Constructor Summary

    Constructors
    Constructor
    Description
    ExprType(SeqType seqType)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    assign(Expr expr)
    Assigns type information of the specified expression.
    void
    Assigns the specified expression type.
    void
    assign(Occ occ)
    Assigns the specified occurrence indicator, updates the result size.
    void
    Assigns the specified sequence type, updates the result size.
    void
    assign(SeqType st, long sz)
    Assigns the specified sequence type and result size.
    void
    assign(SeqType st, long[] minMax)
    Assigns the type and result size, based on the specified min/max occurrences.
    void
    assign(SeqType st, Occ occ, long sz)
    Assigns the specified type and result size.
    void
    assign(Type type)
    Assigns the specified type.
    void
    assign(Type type, Occ occ)
    Assigns the specified type and occurrence indicator, updates the result size.
    void
    refine(Expr expr)
    Refines the type with type information from the specified expression.
    Returns the sequence type.
    long
    Returns the result size.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • ExprType

      public ExprType(SeqType seqType)
      Constructor.
      Parameters:
      seqType - sequence type
  • Method Details

    • seqType

      public SeqType seqType()
      Returns the sequence type.
      Returns:
      sequence type
    • size

      public long size()
      Returns the result size.
      Returns:
      result size
    • assign

      public void assign(SeqType st)
      Assigns the specified sequence type, updates the result size.
      Parameters:
      st - sequence type
    • assign

      public void assign(Expr expr)
      Assigns type information of the specified expression.
      Parameters:
      expr - expression
    • assign

      public void assign(ExprType et)
      Assigns the specified expression type.
      Parameters:
      et - expression type
    • assign

      public void assign(Type type)
      Assigns the specified type.
      Parameters:
      type - type
    • assign

      public void assign(Type type, Occ occ)
      Assigns the specified type and occurrence indicator, updates the result size.
      Parameters:
      type - type
      occ - occurrence indicator
    • assign

      public void assign(Occ occ)
      Assigns the specified occurrence indicator, updates the result size.
      Parameters:
      occ - occurrence indicator
    • assign

      public void assign(SeqType st, long sz)
      Assigns the specified sequence type and result size. The occurrence indicator of the sequence type is ignored if the result size is known.
      Parameters:
      st - sequence type
      sz - result size (unknown if negative)
    • assign

      public void assign(SeqType st, Occ occ, long sz)
      Assigns the specified type and result size. The specified occurrence indicator is ignored if the result size is known.
      Parameters:
      st - sequence type (the occurrence indicator is ignored)
      occ - occurrence indicator
      sz - result size (unknown if negative)
    • assign

      public void assign(SeqType st, long[] minMax)
      Assigns the type and result size, based on the specified min/max occurrences.
      Parameters:
      st - sequence type (the occurrence indicator is ignored)
      minMax - min/max values (min: 0 or more, max: -1 or more)
    • refine

      public void refine(Expr expr)
      Refines the type with type information from the specified expression.
      Parameters:
      expr - expression with original type
    • toString

      public String toString()
      Overrides:
      toString in class Object