Class CollectionShape

java.lang.Object
software.amazon.smithy.model.shapes.Shape
software.amazon.smithy.model.shapes.CollectionShape
All Implemented Interfaces:
Comparable<Shape>, FromSourceLocation, ToShapeId, Tagged
Direct Known Subclasses:
ListShape

public abstract class CollectionShape extends Shape
Abstract class representing Set and List shapes.
  • Method Details

    • getMember

      public final MemberShape getMember()
      Get the member shape of the collection.
      Returns:
      Returns the member shape.
    • getMember

      public Optional<MemberShape> getMember(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 final Map<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.