Returns an "identity" of this position, useful for serializing to logs or across communication mediums. @return The identity in bytes.
()
| 77 | * @return The identity in bytes. |
| 78 | */ |
| 79 | public byte[] identity() { |
| 80 | byte[] bytes = new byte[8]; |
| 81 | bytes[0] = (byte) (0xff & (value >> 56)); |
| 82 | bytes[1] = (byte) (0xff & (value >> 48)); |
| 83 | bytes[2] = (byte) (0xff & (value >> 40)); |
| 84 | bytes[3] = (byte) (0xff & (value >> 32)); |
| 85 | bytes[4] = (byte) (0xff & (value >> 24)); |
| 86 | bytes[5] = (byte) (0xff & (value >> 16)); |
| 87 | bytes[6] = (byte) (0xff & (value >> 8)); |
| 88 | bytes[7] = (byte) (0xff & value); |
| 89 | return bytes; |
| 90 | } |
| 91 | |
| 92 | /** |
| 93 | * Creates a position identified by an integral {@code value}. |