Class StringTrait

    • Constructor Detail

      • StringTrait

        public StringTrait​(ShapeId id,
                           java.lang.String value,
                           FromSourceLocation sourceLocation)
        Parameters:
        id - The ID of the trait being created.
        value - The string value of the trait.
        sourceLocation - Where the trait was defined.
    • Method Detail

      • getValue

        public java.lang.String getValue()
        Returns:
        Get the trait value.
      • createNode

        protected final 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.