Class EnumValueTrait

    • Field Detail

      • ID

        public static final ShapeId ID
    • Method Detail

      • getStringValue

        public java.util.Optional<java.lang.String> getStringValue()
        Gets the string value if a string value was set.
        Returns:
        Optionally returns the string value.
      • expectStringValue

        public java.lang.String expectStringValue()
        Gets the string value.
        Returns:
        Returns the string value.
        Throws:
        ExpectationNotMetException - if the string value was not set.
      • getIntValue

        public java.util.Optional<java.lang.Integer> getIntValue()
        Gets the int value if an int value was set.
        Returns:
        Returns the set int value.
      • expectIntValue

        public int expectIntValue()
        Gets the int value.
        Returns:
        Returns the int value.
        Throws:
        ExpectationNotMetException - if the int value was not set.
      • createNode

        protected Node createNode()
        Description copied from class: AbstractTrait
        The result of toNode is used for hashCodes and equality. Subclasses must implement createNode to turn the trait into a Node. This is then cached for subsequent retrievals.
        Specified by:
        createNode in class AbstractTrait
        Returns:
        Returns the trait as a node.