public abstract class rtypes extends Object
Arrays
or
Collections
which is responsible for creating RTypes from
static factory methods. Where possible, factory methods return cached values
(the fly-weight pattern) such that rbool(true) == rbool(true)
might hold true.
This class is fairly non-traditional Java and instead is more like a Python
module or static methods in C++ to keep the three language bindings fairly in
step.Modifier and Type | Class and Description |
---|---|
static interface |
rtypes.Conversion
SPI-style interface which helps the omero server to properly convert
omero.RType objects into Java-native objects for use in Hibernate.
|
static class |
rtypes.RTypeObjectFactoryRegistry |
Constructor and Description |
---|
rtypes() |
Modifier and Type | Method and Description |
---|---|
static omero.RArray |
rarray(Collection<omero.RType> val) |
static omero.RArray |
rarray(omero.RType... val) |
static omero.RBool |
rbool(boolean val) |
static omero.RClass |
rclass(String val) |
static omero.RDouble |
rdouble(double val) |
static omero.RFloat |
rfloat(float val) |
static omero.RInt |
rint(int val) |
static omero.RInternal |
rinternal(omero.Internal val) |
static omero.RList |
rlist(Collection<omero.RType> val) |
static omero.RList |
rlist(omero.RType... val) |
static omero.RLong |
rlong(long val) |
static omero.RMap |
rmap() |
static omero.RMap |
rmap(Map<String,omero.RType> val) |
static omero.RMap |
rmap(String key,
omero.RType val) |
static omero.RObject |
robject(omero.model.IObject val) |
static omero.RSet |
rset(Collection<omero.RType> val) |
static omero.RSet |
rset(omero.RType... val) |
static omero.RString |
rstring(String val) |
static omero.RTime |
rtime_max() |
static omero.RTime |
rtime_min() |
static omero.RTime |
rtime_str(String tstr) |
static omero.RTime |
rtime(Date date) |
static omero.RTime |
rtime(long val) |
static omero.RType |
rtype(Object obj)
Attempts to dispatch to the other omero.rtypes.* static methods
to create a proper
RType subclass by checking the type
of the input. |
static Object |
unwrap(omero.RType value)
Descends into data structures unwrapping all RType objects as it goes.
|
static Object |
unwrap(omero.RType value,
Map<omero.RType,Object> cache)
Descends into data structures wrapping all elements as it goes.
|
protected static void |
unwrapCollection(Collection<omero.RType> rtypes,
Collection<Object> rv,
Map<omero.RType,Object> cache) |
static omero.RType |
wrap(Object value)
Descends into data structures wrapping all elements as it goes.
|
static omero.RType |
wrap(Object value,
Map<Object,omero.RType> cache)
Descends into data structures wrapping all elements as it goes.
|
public static omero.RType rtype(Object obj)
RType
subclass by checking the type
of the input. If null is given, null is returned. Otherwise, where
possible an RType
is returned, else ClientError
is
thrown.public static omero.RType wrap(Object value)
wrap(Object, Map)
with a new cache argument.value
- the value to wrappublic static omero.RType wrap(Object value, Map<Object,omero.RType> cache)
value
- the value to wrapcache
- a cache of wrapped values (to be expanded by misses)ClientError
- if all else fails.public static Object unwrap(omero.RType value)
List
instances!
Calls unwrap(RType, Map)
with a new cache argument.value
- the wrapped valuepublic static Object unwrap(omero.RType value, Map<omero.RType,Object> cache)
List
instances!
The cache argument is used to prevent cycles.value
- the wrapped valuecache
- a cache of unwrapped values (to be expanded by misses)protected static void unwrapCollection(Collection<omero.RType> rtypes, Collection<Object> rv, Map<omero.RType,Object> cache)
public static omero.RBool rbool(boolean val)
public static omero.RDouble rdouble(double val)
public static omero.RFloat rfloat(float val)
public static omero.RInt rint(int val)
public static omero.RLong rlong(long val)
public static omero.RTime rtime(long val)
public static omero.RTime rtime(Date date)
public static omero.RTime rtime_min()
public static omero.RTime rtime_max()
public static omero.RTime rtime_str(String tstr)
public static omero.RInternal rinternal(omero.Internal val)
public static omero.RObject robject(omero.model.IObject val)
public static omero.RClass rclass(String val)
public static omero.RString rstring(String val)
public static omero.RArray rarray(omero.RType... val)
public static omero.RArray rarray(Collection<omero.RType> val)
public static omero.RList rlist(omero.RType... val)
public static omero.RList rlist(Collection<omero.RType> val)
public static omero.RSet rset(omero.RType... val)
public static omero.RSet rset(Collection<omero.RType> val)
public static omero.RMap rmap()
public static omero.RMap rmap(String key, omero.RType val)
Version: 5.3.3-ice35-b63
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.