Class DataGeneratorVariable


  • public final class DataGeneratorVariable
    extends java.lang.Object
    The DataGeneratorVariable class describes a variable passed to a data generator in a query. Generated data must be assigned to variables.
    • Constructor Summary

      Constructors 
      Constructor Description
      DataGeneratorVariable​(java.lang.String name, ru.ispras.fortress.expression.Node node)
      Constructs a variable with the specified name described with the specified Node object.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the variable name.
      int getSize()
      Returns variable bit size.
      ru.ispras.fortress.data.DataType getType()
      Returns the variable data type.
      ru.ispras.fortress.expression.NodeValue getValue()
      Returns a node describing the variable value.
      boolean isType​(ru.ispras.fortress.data.DataType type)
      Checks whether the variable has the specified type (types are compared on the DataType level).
      boolean isType​(ru.ispras.fortress.data.DataTypeId typeId)
      Checks whether the variable has the specified type (types are compared on the DataTypeId level).
      boolean isUnknown()
      Checks whether the variable is an unknown variable that must have its value assigned.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DataGeneratorVariable

        public DataGeneratorVariable​(java.lang.String name,
                                     ru.ispras.fortress.expression.Node node)
        Constructs a variable with the specified name described with the specified Node object.
        Parameters:
        name - Variable name.
        node - Node describing the variable.
        Throws:
        java.lang.IllegalArgumentException - if any of the parameters is null; if the node is not a value or a variable; if the variable data type is not a bit vector.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the variable name.
        Returns:
        Variable name.
      • getType

        public ru.ispras.fortress.data.DataType getType()
        Returns the variable data type.
        Returns:
        Variable data type.
      • isType

        public boolean isType​(ru.ispras.fortress.data.DataTypeId typeId)
        Checks whether the variable has the specified type (types are compared on the DataTypeId level).
        Parameters:
        typeId - DataTypeId object the data type is to be compared to.
        Returns:
        true if the variable type matches the type specified by the typeId argument or false otherwise.
      • isType

        public boolean isType​(ru.ispras.fortress.data.DataType type)
        Checks whether the variable has the specified type (types are compared on the DataType level).
        Parameters:
        type - DataType object the data type is to be compared to.
        Returns:
        true if the variable type matches the type specified by the type argument or false otherwise.
      • getSize

        public int getSize()
        Returns variable bit size.
        Returns:
        Variable bit size.
      • isUnknown

        public boolean isUnknown()
        Checks whether the variable is an unknown variable that must have its value assigned.
        Returns:
        true if this is an unknown variable or false otherwise.
      • getValue

        public ru.ispras.fortress.expression.NodeValue getValue()
        Returns a node describing the variable value.
        Returns:
        A node describing the variable value.
        Throws:
        java.lang.IllegalStateException - if the variable has no value.