UniqueId encapsulates the creation, parsing, and display of unique IDs
for TestDescriptors.
Instances of this class have value semantics and are immutable.
| Modifier and Type | Class and Description |
|---|---|
| public static class | UniqueId.
A segment of a |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private transient int | |
| private final List | |
| private static final long | |
| private transient @Nullable SoftReference | |
| private final UniqueIdFormat |
| Access | Constructor and Description |
|---|---|
| private | |
| pack-priv | UniqueId(UniqueIdFormat uniqueIdFormat, List<UniqueId.
Initialize a |
| Modifier and Type | Method and Description |
|---|---|
| public UniqueId | |
| public UniqueId | |
| public UniqueId | appendEngine(String
the engine ID; never engineId)null or blankConstruct a new |
| protected Object | |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public static UniqueId | |
| public Optional | |
| public UniqueId. | |
| pack-priv Optional | |
| public List | |
| public int | |
| public boolean | |
| public static UniqueId | |
| public UniqueId | Returns: a newUniqueId; never nullConstruct a new |
| public static UniqueId | |
| public String | toString()
Overrides java. Generate the unique, formatted string representation of this |
| ENGINE_SEGMENT_TYPE | back to summary |
|---|---|
| private static final String ENGINE_SEGMENT_TYPE | |
| hashCode | back to summary |
|---|---|
| private transient int hashCode | |
| segments | back to summary |
|---|---|
private final List<UniqueId.
| |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| toString | back to summary |
|---|---|
| private transient @Nullable SoftReference<String> toString | |
| uniqueIdFormat | back to summary |
|---|---|
| private final UniqueIdFormat uniqueIdFormat | |
| UniqueId | back to summary |
|---|---|
| private UniqueId(UniqueIdFormat uniqueIdFormat, UniqueId. | |
| UniqueId | back to summary |
|---|---|
| pack-priv UniqueId(UniqueIdFormat uniqueIdFormat, List<UniqueId. Initialize a Implementation Note A defensive copy of the segment list is not created by this implementation. All callers should immediately drop the reference to the list instance that they pass into this constructor. | |
| append | back to summary |
|---|---|
| public UniqueId append(String segmentType, String value) Construct a new This Neither the | |
| append | back to summary |
|---|---|
| public UniqueId append(UniqueId. Construct a new This | |
| appendEngine | back to summary |
|---|---|
| public UniqueId appendEngine(String engineId) Construct a new This | |
| clone | back to summary |
|---|---|
| protected Object clone() throws CloneNotSupportedException Overrides java. Doc from java. Creates and returns a copy of this object. The precise meaning
of "copy" may depend on the class of the object. The general
intent is that, for any object will be true, and that the expression:x.clone() != x will bex.clone().getClass() == x.getClass() true, but these are not absolute requirements.
While it is typically the case that:
will bex.clone().equals(x) true, this is not an absolute requirement.
By convention, the returned object should be obtained by calling
By convention, the object returned by this method should be independent
of this object (which is being cloned). To achieve this independence,
it may be necessary to modify one or more fields of the object returned
by
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| forEngine | back to summary |
|---|---|
| public static UniqueId forEngine(String engineId) Create an engine's unique ID from its The engine ID will be stored in a
| |
| getEngineId | back to summary |
|---|---|
| public Optional Get the engine ID stored in this
| |
| getLastSegment | back to summary |
|---|---|
| public UniqueId. Get the last | |
| getRoot | back to summary |
|---|---|
| pack-priv Optional | |
| getSegments | back to summary |
|---|---|
| public List Get the immutable list of segments that make up this
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| hasPrefix | back to summary |
|---|---|
| public boolean hasPrefix(UniqueId potentialPrefix) Determine if the supplied | |
| parse | back to summary |
|---|---|
| public static UniqueId parse(String uniqueId) throws JUnitException Parse a
| |
| removeLastSegment | back to summary |
|---|---|
| public UniqueId removeLastSegment() Construct a new This
| |
| root | back to summary |
|---|---|
| public static UniqueId root(String segmentType, String value) Create a root unique ID from the supplied
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Generate the unique, formatted string representation of this
| |
UniqueId comprises a type and a
value.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| private final String | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public String | |
| public String | |
| public int | |
| public String |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID
| |
| type | back to summary |
|---|---|
| private final String type | |
| value | back to summary |
|---|---|
| private final String value | |
| Segment | back to summary |
|---|---|
| pack-priv Segment(String type, String value) Create a new | |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| getType | back to summary |
|---|---|
| public String getType() Get the type of this segment. | |
| getValue | back to summary |
|---|---|
| public String getValue() Get the value of this segment. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |