Package org.sosy_lab.common.collect
Class MapsDifference
- java.lang.Object
-
- org.sosy_lab.common.collect.MapsDifference
-
public final class MapsDifference extends Object
Utilities for handling differences between maps.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
MapsDifference.DefaultVisitor<K,V>
Default implementation ofMapsDifference.Visitor
with empty methods.static class
MapsDifference.Entry<K,V>
Class representing the difference between two maps for a given key.static interface
MapsDifference.Visitor<K,V>
Interface for visiting map entries differing between two maps.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <K,V>
MapsDifference.Visitor<K,V>collectMapsDifferenceTo(Collection<MapsDifference.Entry<K,V>> target)
Returns aMapsDifference.Visitor
that collects all map differences asMapsDifference.Entry
objects into a given collection.static <K,V>
MapsDifference.Visitor<K,V>ignoreMapsDifference()
Returns a defaultMapsDifference.Visitor
that does nothing.
-
-
-
Method Detail
-
ignoreMapsDifference
public static <K,V> MapsDifference.Visitor<K,V> ignoreMapsDifference()
Returns a defaultMapsDifference.Visitor
that does nothing. Use this if a method requires a visitor to be passed but you are not interested in the elements.
-
collectMapsDifferenceTo
public static <K,V> MapsDifference.Visitor<K,V> collectMapsDifferenceTo(Collection<MapsDifference.Entry<K,V>> target)
Returns aMapsDifference.Visitor
that collects all map differences asMapsDifference.Entry
objects into a given collection.
-
-