Package software.amazon.smithy.diff
Class Differences
java.lang.Object
software.amazon.smithy.diff.Differences
Queryable container for detected structural differences between two models.
-
Method Summary
Modifier and TypeMethodDescriptionGets all added metadata.Stream<software.amazon.smithy.model.shapes.Shape>
Gets all added shapes.<T extends software.amazon.smithy.model.shapes.Shape>
Stream<T>addedShapes
(Class<T> shapeType) Gets all of the added shapes of a specific type.Gets a stream of all changed metadata.Stream<ChangedShape<software.amazon.smithy.model.shapes.Shape>>
Gets all changed shapes.<T extends software.amazon.smithy.model.shapes.Shape>
Stream<ChangedShape<T>>changedShapes
(Class<T> type) Gets all changed shapes of a specific type.boolean
software.amazon.smithy.model.Model
Gets the new model.software.amazon.smithy.model.Model
Gets the old model.int
hashCode()
Gets all removed metadata.Stream<software.amazon.smithy.model.shapes.Shape>
Gets all removed shapes.<T extends software.amazon.smithy.model.shapes.Shape>
Stream<T>removedShapes
(Class<T> shapeType) Gets all of the removed shapes of a specific type.
-
Method Details
-
getOldModel
public software.amazon.smithy.model.Model getOldModel()Gets the old model.- Returns:
- Returns the old model.
-
getNewModel
public software.amazon.smithy.model.Model getNewModel()Gets the new model.- Returns:
- Returns the new model.
-
addedShapes
Gets all added shapes.- Returns:
- Returns a stream of each added shape.
-
addedShapes
public <T extends software.amazon.smithy.model.shapes.Shape> Stream<T> addedShapes(Class<T> shapeType) Gets all of the added shapes of a specific type.- Type Parameters:
T
- Type of shape.- Parameters:
shapeType
- Type of shape to find.- Returns:
- Returns a stream of each added shape of a specific type.
-
addedMetadata
public Stream<software.amazon.smithy.utils.Pair<String,software.amazon.smithy.model.node.Node>> addedMetadata()Gets all added metadata.Each Pair returned contains the name of the metadata key on the left of the Pair and the metadata value on the right.
- Returns:
- Returns a stream of added metadata.
-
removedShapes
Gets all removed shapes.- Returns:
- Returns a stream of each removed shape.
-
removedShapes
public <T extends software.amazon.smithy.model.shapes.Shape> Stream<T> removedShapes(Class<T> shapeType) Gets all of the removed shapes of a specific type.- Type Parameters:
T
- Type of shape.- Parameters:
shapeType
- Type of shape to find.- Returns:
- Returns a stream of each removed shape of a specific type.
-
removedMetadata
public Stream<software.amazon.smithy.utils.Pair<String,software.amazon.smithy.model.node.Node>> removedMetadata()Gets all removed metadata.Each Pair returned contains the name of the metadata key on the left of the Pair and the metadata value on the right.
- Returns:
- Returns a stream of removed metadata.
-
changedShapes
Gets all changed shapes.- Returns:
- Returns a stream of changed shapes.
-
changedShapes
public <T extends software.amazon.smithy.model.shapes.Shape> Stream<ChangedShape<T>> changedShapes(Class<T> type) Gets all changed shapes of a specific type.- Type Parameters:
T
- Type of shape.- Parameters:
type
- Type of shape to find.- Returns:
- Returns a stream of matching changed shapes.
-
changedMetadata
Gets a stream of all changed metadata.- Returns:
- Returns the changed metadata.
-
equals
-
hashCode
public int hashCode()
-