< prev index next >
src/java.base/share/classes/java/util/UUID.java
Print this page
*** 390,410 ****
* }</pre></blockquote>
*
* @return A string representation of this {@code UUID}
*/
public String toString() {
! char[] chars = new char[36];
! jla.formatUnsignedLong(mostSigBits >> 32, 4, chars, 0, 8);
! chars[8] = '-';
! jla.formatUnsignedLong(mostSigBits >> 16, 4, chars, 9, 4);
! chars[13] = '-';
! jla.formatUnsignedLong(mostSigBits, 4, chars, 14, 4);
! chars[18] = '-';
! jla.formatUnsignedLong(leastSigBits >> 48, 4, chars, 19, 4);
! chars[23] = '-';
! jla.formatUnsignedLong(leastSigBits, 4, chars, 24, 12);
! return jla.newStringUnsafe(chars);
}
/**
* Returns a hash code for this {@code UUID}.
*
--- 390,400 ----
* }</pre></blockquote>
*
* @return A string representation of this {@code UUID}
*/
public String toString() {
! return jla.fastUUID(leastSigBits, mostSigBits);
}
/**
* Returns a hash code for this {@code UUID}.
*
< prev index next >