Class IntegerShape

All Implemented Interfaces:
Comparable<Shape>, FromSourceLocation, ToShapeId, software.amazon.smithy.utils.Tagged, software.amazon.smithy.utils.ToSmithyBuilder<IntegerShape>
Direct Known Subclasses:
IntEnumShape

public class IntegerShape extends NumberShape implements software.amazon.smithy.utils.ToSmithyBuilder<IntegerShape>
Represents an integer shape.
  • Method Details

    • builder

      public static IntegerShape.Builder builder()
    • toBuilder

      public IntegerShape.Builder toBuilder()
      Specified by:
      toBuilder in interface software.amazon.smithy.utils.ToSmithyBuilder<IntegerShape>
    • 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.
    • asIntegerShape

      public Optional<IntegerShape> asIntegerShape()
      Overrides:
      asIntegerShape in class Shape
      Returns:
      Optionally returns the shape as a IntegerShape.
    • 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;