UUID

UUID is an implementation of the UUIDs and GUIDs specification in Java.
Download

UUID Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Johann Burkard
  • Publisher web site:
  • http://johannburkard.de/software/uuid/

UUID Tags


UUID Description

UUID is an implementation of the UUIDs and GUIDs specification in Java. UUID is an implementation of the UUIDs and GUIDs specification in Java. UUIDs are 128 bit long identifiers that are guaranteed to be unique.Example codeDownload the latest version and extract the uuid.jar file from the archive. Open a command prompt and type:> java -jar uuid.jarA UUID should get printed out. You should be able to compile the following example if uuid.jar is in your classpath:import com.eaio.uuid.UUID;public class UUIDTest { public static void main(String[] args) { UUID u = new UUID(); System.out.println(u); }}Try assembling UUIDs yourself:UUID u = new UUID(4242L, 4242L);Of course, comparing and equality testing is fully implemented:UUID u1 = new UUID(4242L, 0L);UUID u2 = new UUID(5203L, 9412);System.out.println(u1.equals(u2)); // prints out "false"System.out.println(u1.compareTo(u2)); // prints out "-1"As well as cloning:UUID u1 = new UUID(4242L, 0L);UUID u2 = (UUID) u1.clone();UUID u3 = new UUID(u1); // or use the clone constructorKeep in mind that this UUID implementation has public fields (for compatibility with the EJB primary key specification), so cloning should be used for security purposes between in-VM system boundaries.What's New in This Release:· This release corrects MAC address detection on Mac OS X Leopard.


UUID Related Software