Package omero.cmd.graphs
Class GraphUtil
- java.lang.Object
-
- omero.cmd.graphs.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.
-
-
-
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
-
-