Java UUID Class methods, constructors, variables available in Java 8 release are listed below. We will publish example program on each methods ASAP.
Constructors in Java UUID Class
S.No | Constructor & Description |
---|---|
1 | UUID(long mostSigBits, long leastSigBits)
Constructs a new UUID using the specified data.
|
Methods in Java UUID Class
S.No | Method & Description |
---|---|
1 | int clockSequence()
The clock sequence value associated with this UUID.
|
2 | int compareTo(UUID val)
Compares this UUID with the specified UUID.
|
3 | boolean equals(Object obj) Compares this object to the specified object.
|
4 | static UUID fromString(String name)
Creates a UUID from the string standard representation as described in the toString() method.
|
5 | long getLeastSignificantBits()
Returns the least significant 64 bits of this UUID’s 128 bit value.
|
6 | long getMostSignificantBits()
Returns the most significant 64 bits of this UUID’s 128 bit value.
|
7 | int hashCode()
Returns a hash code for this UUID.
|
8 | static UUID nameUUIDFromBytes(byte[] name)
Static factory to retrieve a type 3 (name based) UUID based on the specified byte array.
|
9 | long node()
The node value associated with this UUID.
|
10 | static UUID randomUUID()
Static factory to retrieve a type 4 (pseudo randomly generated) UUID.
|
11 | long timestamp()
The timestamp value associated with this UUID.
|
12 | String toString()
Returns a String object representing this UUID.
|
13 | int variant()
The variant number associated with this UUID.
|
14 | int version()
The version number associated with this UUID.
|
Ask your questions in eHowToNow Forum
Post your technical, non-technical doubts, questions in our site. Get answer as soon as possible, meanwhile you can help others by answering, unanswered questions.
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
To Ask new Question : Ask Question
Check our existing discussions : Questions & Answers
- Java – ThreadPoolExecutor.CallerRunsPolicy Class
- Java – PrimitiveIterator Interface
- Java – LongAdder Class
- Java – AbstractCollection Class
- Java – Scanner Class
- Java – AbstractMap.SimpleEntry Class
- Java – AtomicStampedReference Class
- java.util Package
- Java – DelayQueue Class
- Java ArrayList isEmpty() method with example
- Java – CountDownLatch Class
- Java – IntBinaryOperator Interface
- Java – WeakHashMap Class
- Java – ConcurrentLinkedQueue Class
- Java – Spliterators.AbstractDoubleSpliterator Class
Leave a Reply
You must be logged in to post a comment.