Class MapShape

    • Method Detail

      • accept

        public <R> R accept​(ShapeVisitor<R> visitor)
        Description copied from class: Shape
        Dispatches the shape to the appropriate ShapeVisitor method.
        Specified by:
        accept in class Shape
        Type Parameters:
        R - Return type of the accept.
        Parameters:
        visitor - ShapeVisitor to use.
        Returns:
        Returns the result.
      • asMapShape

        public java.util.Optional<MapShape> asMapShape()
        Overrides:
        asMapShape in class Shape
        Returns:
        Optionally returns the shape as a MapShape.
      • getType

        public ShapeType getType()
        Description copied from class: Shape
        Gets the type of the shape.
        Specified by:
        getType in class Shape
        Returns:
        Returns the type;
      • getValue

        public MemberShape getValue()
        Get the value member shape of the map.
        Returns:
        Returns the value member shape.
      • getKey

        public MemberShape getKey()
        Get the key member shape of the map.
        Returns:
        Returns the key member shape.
      • getMember

        public java.util.Optional<MemberShape> getMember​(java.lang.String memberName)
        Description copied from class: Shape
        Get a specific member by name.

        Shapes with no members return an empty Optional.

        Overrides:
        getMember in class Shape
        Parameters:
        memberName - Name of the member to retrieve.
        Returns:
        Returns the optional member.
      • getAllMembers

        public java.util.Map<java.lang.String,​MemberShape> getAllMembers()
        Description copied from class: Shape
        Gets the members of the shape, including mixin members.
        Overrides:
        getAllMembers in class Shape
        Returns:
        Returns the immutable member map.