@Test public void castsToString() { Shape shape = StringShape.builder().id("ns.foo#baz").build(); assertEquals("(string: `ns.foo#baz`)", shape.toString()); }
@Override public final String toString() { return "(" + getType() + ": `" + getId() + "`)"; }
Shape implements FromSourceLocation, Tagged, ToShapeId, Comparable<Shape> { @Override public final String toString() { return "(" + getType() + ": `" + getId() + "`)"; } }
Shape implements FromSourceLocation, Tagged, ToShapeId, Comparable<Shape> { @Override public final String toString() { return "(" + getType() + ": `" + getId() + "`)"; } @SuppressWarnings("unchecked")  Shape(AbstractShapeBuilder builder, boolean expectMemberSegments); }
Shape implements FromSourceLocation, Tagged, ToShapeId, Comparable<Shape> { @Override public final String toString() { return "(" + getType() + ": `" + getId() + "`)"; } @SuppressWarnings("unchecked")  Shape(AbstractShapeBuilder builder, boolean expectMemberSegments); @SuppressWarnings("unchecked") static B shapeToBuilder(S shape); final ShapeType getType(); abstract R accept(ShapeVisitor<R> cases); final ShapeId getId(); boolean hasTrait(String id); boolean hasTrait(ShapeId id); boolean hasTrait(Class<? extends Trait> traitClass); Optional<Trait> findTrait(ShapeId id); Optional<Trait> findTrait(String id); @SuppressWarnings("unchecked") final Optional<T> getTrait(Class<T> traitClass); final T expectTrait(Class<T> traitClass); final Map<ShapeId, Trait> getAllTraits(); Optional<T> getMemberTrait(Model model, Class<T> trait); Optional<Trait> findMemberTrait(Model model, String traitName); Optional<BigDecimalShape> asBigDecimalShape(); Optional<BigIntegerShape> asBigIntegerShape(); Optional<BlobShape> asBlobShape(); Optional<BooleanShape> asBooleanShape(); Optional<ByteShape> asByteShape(); Optional<ShortShape> asShortShape(); Optional<FloatShape> asFloatShape(); Optional<DocumentShape> asDocumentShape(); Optional<DoubleShape> asDoubleShape(); Optional<IntegerShape> asIntegerShape(); Optional<ListShape> asListShape(); Optional<SetShape> asSetShape(); Optional<LongShape> asLongShape(); Optional<MapShape> asMapShape(); Optional<MemberShape> asMemberShape(); Optional<OperationShape> asOperationShape(); Optional<ResourceShape> asResourceShape(); Optional<ServiceShape> asServiceShape(); Optional<StringShape> asStringShape(); Optional<StructureShape> asStructureShape(); Optional<UnionShape> asUnionShape(); Optional<TimestampShape> asTimestampShape(); final boolean isBigDecimalShape(); final boolean isBigIntegerShape(); final boolean isBlobShape(); final boolean isBooleanShape(); final boolean isByteShape(); final boolean isShortShape(); final boolean isFloatShape(); final boolean isDocumentShape(); final boolean isDoubleShape(); final boolean isListShape(); final boolean isSetShape(); final boolean isIntegerShape(); final boolean isLongShape(); final boolean isMapShape(); final boolean isMemberShape(); final boolean isOperationShape(); final boolean isResourceShape(); final boolean isServiceShape(); final boolean isStringShape(); final boolean isStructureShape(); final boolean isUnionShape(); final boolean isTimestampShape(); Collection<MemberShape> members(); @Override ShapeId toShapeId(); @Override final List<String> getTags(); @Override final SourceLocation getSourceLocation(); @Override int compareTo(Shape other); @Override final String toString(); @Override int hashCode(); @Override boolean equals(Object o); }
Shape implements FromSourceLocation, Tagged, ToShapeId, Comparable<Shape> { @Override public final String toString() { return "(" + getType() + ": `" + getId() + "`)"; } @SuppressWarnings("unchecked")  Shape(AbstractShapeBuilder builder, boolean expectMemberSegments); @SuppressWarnings("unchecked") static B shapeToBuilder(S shape); final ShapeType getType(); abstract R accept(ShapeVisitor<R> cases); final ShapeId getId(); boolean hasTrait(String id); boolean hasTrait(ShapeId id); boolean hasTrait(Class<? extends Trait> traitClass); Optional<Trait> findTrait(ShapeId id); Optional<Trait> findTrait(String id); @SuppressWarnings("unchecked") final Optional<T> getTrait(Class<T> traitClass); final T expectTrait(Class<T> traitClass); final Map<ShapeId, Trait> getAllTraits(); Optional<T> getMemberTrait(Model model, Class<T> trait); Optional<Trait> findMemberTrait(Model model, String traitName); Optional<BigDecimalShape> asBigDecimalShape(); Optional<BigIntegerShape> asBigIntegerShape(); Optional<BlobShape> asBlobShape(); Optional<BooleanShape> asBooleanShape(); Optional<ByteShape> asByteShape(); Optional<ShortShape> asShortShape(); Optional<FloatShape> asFloatShape(); Optional<DocumentShape> asDocumentShape(); Optional<DoubleShape> asDoubleShape(); Optional<IntegerShape> asIntegerShape(); Optional<ListShape> asListShape(); Optional<SetShape> asSetShape(); Optional<LongShape> asLongShape(); Optional<MapShape> asMapShape(); Optional<MemberShape> asMemberShape(); Optional<OperationShape> asOperationShape(); Optional<ResourceShape> asResourceShape(); Optional<ServiceShape> asServiceShape(); Optional<StringShape> asStringShape(); Optional<StructureShape> asStructureShape(); Optional<UnionShape> asUnionShape(); Optional<TimestampShape> asTimestampShape(); final boolean isBigDecimalShape(); final boolean isBigIntegerShape(); final boolean isBlobShape(); final boolean isBooleanShape(); final boolean isByteShape(); final boolean isShortShape(); final boolean isFloatShape(); final boolean isDocumentShape(); final boolean isDoubleShape(); final boolean isListShape(); final boolean isSetShape(); final boolean isIntegerShape(); final boolean isLongShape(); final boolean isMapShape(); final boolean isMemberShape(); final boolean isOperationShape(); final boolean isResourceShape(); final boolean isServiceShape(); final boolean isStringShape(); final boolean isStructureShape(); final boolean isUnionShape(); final boolean isTimestampShape(); Collection<MemberShape> members(); @Override ShapeId toShapeId(); @Override final List<String> getTags(); @Override final SourceLocation getSourceLocation(); @Override int compareTo(Shape other); @Override final String toString(); @Override int hashCode(); @Override boolean equals(Object o);  }