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()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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