@Test public void comparesModel() { StringShape a = StringShape.builder().id("ns.foo#a").build(); StringShape b = StringShape.builder().id("ns.foo#b").build(); TimestampShape c = TimestampShape.builder().id("ns.foo#c").build(); Model modelA = Model.builder().addShapes(Arrays.asList(a, b, c)).build(); Model modelB = Model.builder().addShapes(modelA).build(); assertEquals(modelA, modelB); }
public static Builder builder() { return new Builder(); }
Model implements ToSmithyBuilder<Model> { public static Builder builder() { return new Builder(); } }
Model implements ToSmithyBuilder<Model> { public static Builder builder() { return new Builder(); } private  Model(Builder builder); }
Model implements ToSmithyBuilder<Model> { public static Builder builder() { return new Builder(); } private  Model(Builder builder); static Builder builder(); static ModelAssembler assembler(); static ModelAssembler assembler(ClassLoader classLoader); Optional<Node> getMetadataProperty(String name); Map<String, Node> getMetadata(); Optional<TraitDefinition> getTraitDefinition(ToShapeId traitId); Set<Shape> getShapesWithTrait(ToShapeId trait); Set<ShapeId> getShapeIds(); Set<Shape> getShapesWithTrait(Class<? extends Trait> trait); Set<ShapeId> getAppliedTraits(); boolean isTraitApplied(Class<? extends Trait> trait); Optional<Shape> getShape(ShapeId id); Shape expectShape(ShapeId id); @SuppressWarnings("unchecked") T expectShape(ShapeId id, Class<T> type); Stream<Shape> shapes(); Stream<T> shapes(Class<T> shapeType); Set<Shape> toSet(); @Override boolean equals(Object other); @Override int hashCode(); @Override Builder toBuilder(); @Deprecated T getKnowledge(Class<T> type); @SuppressWarnings("unchecked") T getKnowledge(Class<T> type, Function<Model, T> constructor); }
Model implements ToSmithyBuilder<Model> { public static Builder builder() { return new Builder(); } private  Model(Builder builder); static Builder builder(); static ModelAssembler assembler(); static ModelAssembler assembler(ClassLoader classLoader); Optional<Node> getMetadataProperty(String name); Map<String, Node> getMetadata(); Optional<TraitDefinition> getTraitDefinition(ToShapeId traitId); Set<Shape> getShapesWithTrait(ToShapeId trait); Set<ShapeId> getShapeIds(); Set<Shape> getShapesWithTrait(Class<? extends Trait> trait); Set<ShapeId> getAppliedTraits(); boolean isTraitApplied(Class<? extends Trait> trait); Optional<Shape> getShape(ShapeId id); Shape expectShape(ShapeId id); @SuppressWarnings("unchecked") T expectShape(ShapeId id, Class<T> type); Stream<Shape> shapes(); Stream<T> shapes(Class<T> shapeType); Set<Shape> toSet(); @Override boolean equals(Object other); @Override int hashCode(); @Override Builder toBuilder(); @Deprecated T getKnowledge(Class<T> type); @SuppressWarnings("unchecked") T getKnowledge(Class<T> type, Function<Model, T> constructor); static final String MODEL_VERSION; }