Class QueryCast

    • Constructor Summary

      Constructors 
      Constructor Description
      QueryCast​(QueryEvaluable value, java.lang.Class<?> type)
      Construct a QueryCast.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      int getApproximateType()
      Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.
      java.lang.Class<?> getType()
      Get Java type represented by this item.
      QueryEvaluable getValue()
      Returns the QueryEvaluable that is the actual value.
      int hashCode()
      void youAreType​(java.lang.Class<?> cls)
      Allows a caller to suggest to this object that it holds a value of a certain type.
      • Methods inherited from class java.lang.Object

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

      • QueryCast

        public QueryCast​(QueryEvaluable value,
                         java.lang.Class<?> type)
        Construct a QueryCast.
        Parameters:
        value - the value of this QueryCast
        type - the type of the value for this QueryCast to represent
    • Method Detail

      • getType

        public java.lang.Class<?> getType()
        Get Java type represented by this item.
        Specified by:
        getType in interface QueryOrderable
        Specified by:
        getType in interface QuerySelectable
        Returns:
        class describing the type
      • getValue

        public QueryEvaluable getValue()
        Returns the QueryEvaluable that is the actual value.
        Returns:
        the value
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • youAreType

        public void youAreType​(java.lang.Class<?> cls)
        Allows a caller to suggest to this object that it holds a value of a certain type. This method should only be called on objects which report their type to be UnknownTypeValue. Otherwise, this method will throw and exception.
        Specified by:
        youAreType in interface QueryEvaluable
        Parameters:
        cls - the Class of the type to be imposed on this object
      • getApproximateType

        public int getApproximateType()
        Returns an integer representing the approximate type of this QueryEvaluable, in the case where an accurate type cannot be ascertained.
        Specified by:
        getApproximateType in interface QueryEvaluable
        Returns:
        an int, as described in UnknownTypeValue