Class Differences


  • public final class Differences
    extends java.lang.Object
    Queryable container for detected structural differences between two models.
    • Method Detail

      • getOldModel

        public Model getOldModel()
        Gets the old model.
        Returns:
        Returns the old model.
      • getNewModel

        public Model getNewModel()
        Gets the new model.
        Returns:
        Returns the new model.
      • addedShapes

        public java.util.stream.Stream<Shape> addedShapes()
        Gets all added shapes.
        Returns:
        Returns a stream of each added shape.
      • addedShapes

        public <T extends Shape> java.util.stream.Stream<T> addedShapes​(java.lang.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 java.util.stream.Stream<Pair<java.lang.String,​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

        public java.util.stream.Stream<Shape> removedShapes()
        Gets all removed shapes.
        Returns:
        Returns a stream of each removed shape.
      • removedShapes

        public <T extends Shape> java.util.stream.Stream<T> removedShapes​(java.lang.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 java.util.stream.Stream<Pair<java.lang.String,​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

        public java.util.stream.Stream<ChangedShape<Shape>> changedShapes()
        Gets all changed shapes.
        Returns:
        Returns a stream of changed shapes.
      • changedShapes

        public <T extends Shape> java.util.stream.Stream<ChangedShape<T>> changedShapes​(java.lang.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

        public java.util.stream.Stream<ChangedMetadata> changedMetadata()
        Gets a stream of all changed metadata.
        Returns:
        Returns the changed metadata.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object