Class GraphUtil


  • public class GraphUtil
    extends java.lang.Object
    Static utility methods for model graph operations.
    Since:
    5.1.0
    • Constructor Summary

      Constructors 
      Constructor Description
      GraphUtil()  
    • Constructor Detail

      • GraphUtil

        public GraphUtil()
    • Method Detail

      • copyMultimapForResponse

        public static java.util.Map<java.lang.String,​java.util.List<java.lang.Long>> copyMultimapForResponse​(com.google.common.collect.SetMultimap<java.lang.String,​java.lang.Long> result)
        Copy a multimap to a new map. Useful for constructing Ice-compatible responses from graph requests.
        Parameters:
        result - a result from a graph operation
        Returns:
        the result transformed to fit a StringLongListMap API binding
      • getPredicateFromClasses

        public static java.util.function.Predicate<java.lang.Class<? extends ome.model.IObject>> getPredicateFromClasses​(java.lang.Iterable<java.lang.Class<? extends ome.model.IObject>> matchTypes)
        Construct a predicate to test if an object's class is of any of the given classes.
        Parameters:
        matchTypes - model object classes
        Returns:
        a predicate for testing membership of those classes