public enum SegmentType extends Enum<SegmentType>
Path Path.Segment types.| Enum Constant and Description |
|---|
d
DataEntity
|
e
Environment
|
f
Feed
|
m
Metric
|
mp
MetadataPack
|
mt
MetricType
|
ot
OperationType
|
r
Resource
|
rl
Relationship
|
rt
ResourceType
|
sd
StructuredData
|
t
Tenant
|
up |
| Modifier and Type | Field and Description |
|---|---|
static SegmentType |
ANY_ENTITY
Per convention, the
null value is interpreted as any subclass of
org.hawkular.inventory.api.model.Entity |
| Modifier and Type | Method and Description |
|---|---|
static SegmentType |
fastValueOf(String type)
|
static SegmentType |
fromElementType(Class<?> elementType)
Returns a
SegmentType corresponding to the given elementType or null if no corresponding
type can be found. |
static Set<String> |
getCanonicalShortNames() |
static Set<SegmentType> |
getRelativeShortNames() |
String |
getSerialized()
Returns the representation of this
SegmentType suitable for serialization. |
String |
getSimpleName() |
boolean |
isAllowedInCanonical()
All except for
up are allowed in CanonicalPath. |
boolean |
isSerializable()
We do not serialize
sds with a "sd;" prefix. |
static SegmentType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SegmentType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SegmentType t
public static final SegmentType e
public static final SegmentType f
public static final SegmentType m
public static final SegmentType r
public static final SegmentType rt
public static final SegmentType mt
public static final SegmentType rl
public static final SegmentType d
public static final SegmentType ot
public static final SegmentType mp
public static final SegmentType sd
public static final SegmentType up
public static final SegmentType ANY_ENTITY
null value is interpreted as any subclass of
org.hawkular.inventory.api.model.Entitypublic static SegmentType[] values()
for (SegmentType c : SegmentType.values()) System.out.println(c);
public static SegmentType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic static SegmentType fastValueOf(String type)
type - the short name such as "e" or "f" to map to a SegmentTypeSegmentType corresponding to the given type or null of there is no
corresponding SegmentType.public static SegmentType fromElementType(Class<?> elementType)
SegmentType corresponding to the given elementType or null if no corresponding
type can be found.
Performance note: this implementation looks up the given elementType using its
elementType.getSimpleName(). Because Class.getSimpleName() invokes String.substring(int)
this implementation may suboptimal in many use cases.
Therefore, the usage of this method should be avoided in all situations where there is a better alternative, such
as using SEGMENT_TYPE constants defined in the subclasses of
org.hawkular.inventory.api.model.Entity or
org.hawkular.inventory.api.model.Entity.segmentTypeFromType(Class)
elementType - the type to map to a SegmentTypeSegmentType corresponding to the given elementType or null if no
corresponding type can be foundpublic static Set<String> getCanonicalShortNames()
Set of short names that may occur in canonical pathspublic static Set<SegmentType> getRelativeShortNames()
Set of short names that may occur in relative pathspublic boolean isAllowedInCanonical()
up are allowed in CanonicalPath.true if this type of Path.Segment may occur in a CanonicalPath, otherwise
falsepublic boolean isSerializable()
sds with a "sd;" prefix.true unless this is a sd, otherwise falsepublic String getSerialized()
SegmentType suitable for serialization. In most cases the result is
equal to Enum.name() with the notable exception of up, the serialized form of which is "..".SegmentType suitable for serializationpublic String getSimpleName()
org.hawkular.inventory.api.model package.Copyright © 2014–2016 Red Hat, Inc.. All rights reserved.