Class StructureShape

  • All Implemented Interfaces:
    java.lang.Comparable<Shape>, FromSourceLocation, ToShapeId, software.amazon.smithy.utils.Tagged, software.amazon.smithy.utils.ToSmithyBuilder<StructureShape>

    public final class StructureShape
    extends Shape
    implements software.amazon.smithy.utils.ToSmithyBuilder<StructureShape>
    Structure shape that maps shape names to members.
    • Method Detail

      • accept

        public <R> R accept​(ShapeVisitor<R> cases)
        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:
        cases - NeighborVisitor to use.
        Returns:
        Returns the result.
      • getAllMembers

        public java.util.Map<java.lang.String,​MemberShape> getAllMembers()
        Gets the members of the structure.
        Returns:
        Returns the immutable member map.
      • getMemberNames

        public java.util.List<java.lang.String> getMemberNames()
        Returns a list of member names in the order in which they were added.
        Returns:
        Returns list of member names.
      • getMember

        public java.util.Optional<MemberShape> getMember​(java.lang.String name)
        Get a specific member by name.
        Parameters:
        name - Name of the member to retrieve.
        Returns:
        Returns the optional member.
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class Shape