Class MessagePatternUtil.VariantNode

  • Enclosing class:
    MessagePatternUtil

    public static class MessagePatternUtil.VariantNode
    extends MessagePatternUtil.Node
    A Node representing a nested message (nested inside an argument) with its selection criterium.
    • Method Detail

      • getSelector

        public String getSelector()
        Returns the selector string. For example: A plural/select keyword ("few"), a plural explicit value ("=1"), a choice comparison operator ("#").
        Returns:
        the selector string
      • isSelectorNumeric

        public boolean isSelectorNumeric()
        Returns:
        true for choice variants and for plural explicit values
      • getSelectorValue

        public double getSelectorValue()
        Returns:
        the selector's numeric value, or NO_NUMERIC_VALUE if !isSelectorNumeric()
      • toString

        public String toString()
        Returns a string containing a concise, human-readable description of this object. Subclasses are encouraged to override this method and provide an implementation that takes into account the object's type and data. The default implementation is equivalent to the following expression:
           getClass().getName() + '@' + Integer.toHexString(hashCode())

        See Writing a useful toString method if you intend implementing your own toString method.

        Overrides:
        toString in class Object
        Returns:
        a printable representation of this object.