Lines Matching refs:UUID

31  * A class that represents an immutable universally unique identifier (UUID).
32 * A UUID represents a 128-bit value.
36 * constructors allow the creation of any variant of UUID (described below).
38 * <p> The layout of a variant 2 (Leach-Salz) UUID is as follows:
55 * {@code UUID}. The bit layout described above is valid only for a {@code
56 * UUID} with a variant value of 2, which indicates the Leach-Salz variant.
59 * UUID}. There are four different basic types of UUIDs: time-based, DCE
63 * <p> For more information including algorithms used to create {@code UUID}s,
65 * Universally Unique IDentifier (UUID) URN Namespace</i></a>, section 4.2
66 * &quot;Algorithms for Creating a Time-Based UUID&quot;.
70 public final class UUID implements java.io.Serializable, Comparable<UUID> {
78 * The most significant 64 bits of this UUID.
85 * The least significant 64 bits of this UUID.
102 * Private constructor which uses a byte array to construct the new UUID.
104 private UUID(byte[] data) {
117 * Constructs a new {@code UUID} using the specified data. {@code
119 * UUID} and {@code leastSigBits} becomes the least significant 64 bits of
120 * the {@code UUID}.
123 * The most significant bits of the {@code UUID}
126 * The least significant bits of the {@code UUID}
128 public UUID(long mostSigBits, long leastSigBits) {
134 * Static factory to retrieve a type 4 (pseudo randomly generated) UUID.
136 * The {@code UUID} is generated using a cryptographically strong pseudo
139 * @return A randomly generated {@code UUID}
141 public static UUID randomUUID() {
150 return new UUID(randomBytes);
154 * Static factory to retrieve a type 3 (name based) {@code UUID} based on
158 * A byte array to be used to construct a {@code UUID}
160 * @return A {@code UUID} generated from the specified array
162 public static UUID nameUUIDFromBytes(byte[] name) {
174 return new UUID(md5Bytes);
178 * Creates a {@code UUID} from the string standard representation as
182 * A string that specifies a {@code UUID}
184 * @return A {@code UUID} with the specified value
191 public static UUID fromString(String name) {
194 throw new IllegalArgumentException("Invalid UUID string: "+name);
208 return new UUID(mostSigBits, leastSigBits);
214 * Returns the least significant 64 bits of this UUID's 128 bit value.
216 * @return The least significant 64 bits of this UUID's 128 bit value
223 * Returns the most significant 64 bits of this UUID's 128 bit value.
225 * @return The most significant 64 bits of this UUID's 128 bit value
232 * The version number associated with this {@code UUID}. The version
233 * number describes how this {@code UUID} was generated.
237 * <li>1 Time-based UUID
238 * <li>2 DCE security UUID
239 * <li>3 Name-based UUID
240 * <li>4 Randomly generated UUID
243 * @return The version number of this {@code UUID}
251 * The variant number associated with this {@code UUID}. The variant
252 * number describes the layout of the {@code UUID}.
263 * @return The variant number of this {@code UUID}
276 * The timestamp value associated with this UUID.
279 * time_mid, and time_hi fields of this {@code UUID}. The resulting
283 * <p> The timestamp value is only meaningful in a time-based UUID, which
284 * has version type 1. If this {@code UUID} is not a time-based UUID then
288 * If this UUID is not a version 1 UUID
292 throw new UnsupportedOperationException("Not a time-based UUID");
301 * The clock sequence value associated with this UUID.
304 * sequence field of this UUID. The clock sequence field is used to
305 * guarantee temporal uniqueness in a time-based UUID.
308 * UUID, which has version type 1. If this UUID is not a time-based UUID
311 * @return The clock sequence of this {@code UUID}
314 * If this UUID is not a version 1 UUID
318 throw new UnsupportedOperationException("Not a time-based UUID");
325 * The node value associated with this UUID.
328 * UUID. This field is intended to hold the IEEE 802 address of the machine
329 * that generated this UUID to guarantee spatial uniqueness.
331 * <p> The node value is only meaningful in a time-based UUID, which has
332 * version type 1. If this UUID is not a time-based UUID then this method
335 * @return The node value of this {@code UUID}
338 * If this UUID is not a version 1 UUID
342 throw new UnsupportedOperationException("Not a time-based UUID");
351 * Returns a {@code String} object representing this {@code UUID}.
353 * <p> The UUID string representation is as described by this BNF:
356 * UUID = <time_low> "-" <time_mid> "-"
372 * @return A string representation of this {@code UUID}
389 * Returns a hash code for this {@code UUID}.
391 * @return A hash code value for this {@code UUID}
400 * true} if and only if the argument is not {@code null}, is a {@code UUID}
402 * as this {@code UUID}.
411 if ((null == obj) || (obj.getClass() != UUID.class))
413 UUID id = (UUID)obj;
421 * Compares this UUID with the specified UUID.
425 * UUID.
428 * {@code UUID} to which this {@code UUID} is to be compared
430 * @return -1, 0 or 1 as this {@code UUID} is less than, equal to, or
434 public int compareTo(UUID val) {