Class NumericQueryNode

    • Constructor Detail

      • NumericQueryNode

        public NumericQueryNode​(java.lang.CharSequence field,
                                java.lang.Number value,
                                java.text.NumberFormat numberFormat)
        Creates a NumericQueryNode object using the given field, Number value and NumberFormat used to convert the value to String.
        Parameters:
        field - the field associated with this query node
        value - the value hold by this node
        numberFormat - the NumberFormat used to convert the value to String
    • Method Detail

      • getField

        public java.lang.CharSequence getField()
        Returns the field associated with this node.
        Specified by:
        getField in interface FieldableNode
        Returns:
        the field associated with this node
      • setField

        public void setField​(java.lang.CharSequence fieldName)
        Sets the field associated with this node.
        Specified by:
        setField in interface FieldableNode
        Parameters:
        fieldName - the field associated with this node
      • toQueryString

        public java.lang.CharSequence toQueryString​(EscapeQuerySyntax escapeSyntaxParser)
        Description copied from interface: QueryNode
        convert to a query string understood by the query parser
        Specified by:
        toQueryString in interface QueryNode
      • setNumberFormat

        public void setNumberFormat​(java.text.NumberFormat format)
        Sets the NumberFormat used to convert the value to String.
        Parameters:
        format - the NumberFormat used to convert the value to String
      • getNumberFormat

        public java.text.NumberFormat getNumberFormat()
        Returns the NumberFormat used to convert the value to String.
        Returns:
        the NumberFormat used to convert the value to String
      • getValue

        public java.lang.Number getValue()
        Returns the numeric value as Number.
        Specified by:
        getValue in interface ValueQueryNode<java.lang.Number>
        Returns:
        the numeric value
      • setValue

        public void setValue​(java.lang.Number value)
        Sets the numeric value.
        Specified by:
        setValue in interface ValueQueryNode<java.lang.Number>
        Parameters:
        value - the numeric value
      • toString

        public java.lang.String toString()
        Description copied from class: QueryNodeImpl
        Every implementation of this class should return pseudo xml like this: For FieldQueryNode: <field start='1' end='2' field='subject' text='foo'/>
        Specified by:
        toString in interface QueryNode
        Overrides:
        toString in class QueryNodeImpl
        See Also:
        QueryNode.toString()