org.odata4j.core
Class Guid

java.lang.Object
  extended by org.odata4j.core.Guid

public class Guid
extends Object

A custom Guid class is necessary to interop with .net Guid strings incompatible with UUID.

Guids are equal if their string representations are equal.


Method Summary
 boolean equals(Object other)
           
static Guid fromString(String value)
          Return a Guid for a given string.
static Guid fromUUID(UUID uuid)
          Return a Guid for a given UUID.
 int hashCode()
           
static Guid randomGuid()
          Generate a new Guid.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

equals

public boolean equals(Object other)
Overrides:
equals in class Object

fromString

public static Guid fromString(String value)
Return a Guid for a given string.

Parameters:
value - the guid's string representation
Returns:
a new Guid

fromUUID

public static Guid fromUUID(UUID uuid)
Return a Guid for a given UUID.

Parameters:
uuid - an existing UUID
Returns:
a new Guid

hashCode

public int hashCode()
Overrides:
hashCode in class Object

randomGuid

public static Guid randomGuid()
Generate a new Guid.

Returns:
a new Guid

toString

public String toString()
Overrides:
toString in class Object


http://odata4j.org