public class Utils extends Object
Constructor and Description |
---|
Utils() |
Modifier and Type | Method and Description |
---|---|
static <E extends omero.model.IObject> |
fromEnum(Collection<E> enumInstances)
Convert a list of
omero.model.enums instances to their corresponding String values. |
static String |
getDisplayedFileName(String fullPath,
Integer number)
Returns the name to display for a file.
|
static String |
getFolderAsContainerName(File file)
Returns the name as container if option is on.
|
static String |
getStringSeparator(String originalName)
Returns the separator or
null . |
static String[] |
splitString(String originalName)
Returns the partial name of the image's name
|
static <E extends omero.model.IObject,I extends E> |
toEnum(Class<E> enumClass,
Class<I> instanceClass,
Collection<String> enumValues)
Convert a list of
String values to their corresponding omero.model.enums instances. |
public static String getFolderAsContainerName(File file)
public static String getDisplayedFileName(String fullPath, Integer number)
fullPath
- The file's absolute path.number
- The number of folder to set the name.public static String[] splitString(String originalName)
originalName
- The original name.public static String getStringSeparator(String originalName)
null
.originalName
- The original name.public static <E extends omero.model.IObject,I extends E> List<E> toEnum(Class<E> enumClass, Class<I> instanceClass, Collection<String> enumValues) throws ReflectiveOperationException
String
values to their corresponding omero.model.enums
instances.enumClass
- the desired enumeration type, never null
instanceClass
- the type whose no-argument constructor is used to provide instances of enumClass
enumValues
- values of the enumeration type, never null
nor with a null
valueReflectiveOperationException
- if the instances could not be createdpublic static <E extends omero.model.IObject> List<String> fromEnum(Collection<E> enumInstances) throws ReflectiveOperationException
omero.model.enums
instances to their corresponding String
values.enumInstances
- enumeration instances, never null
nor with a null
valuenull
ReflectiveOperationException
- if the values could not be determined
Version: 5.4.0-ice35-b74
Copyright © 2017 The University of Dundee & Open Microscopy Environment. All Rights Reserved.