com.atlassian.gadgets.view
Class ModuleId

java.lang.Object
  extended by com.atlassian.gadgets.view.ModuleId

@Immutable
public final class ModuleId
extends Object

Representation of the identifier for an instance of a gadget rendered on a page.

Since:
2.0

Method Summary
 boolean equals(Object obj)
           
 int hashCode()
           
 String toString()
           
 long value()
          Returns the value of the identifier as a long.
static ModuleId valueOf(long id)
          Converts the long value to a ModuleId object.
static ModuleId valueOf(String id)
          Converts the String value to a ModuleId object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

value

public long value()
Returns the value of the identifier as a long.

Returns:
the value of the identifier as a long

toString

public String toString()
Overrides:
toString in class Object

equals

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

hashCode

public int hashCode()
Overrides:
hashCode in class Object

valueOf

public static ModuleId valueOf(long id)
Converts the long value to a ModuleId object.

Parameters:
id - long value to use
Returns:
ModuleId with the underlying value of id

valueOf

public static ModuleId valueOf(String id)
                        throws NumberFormatException
Converts the String value to a ModuleId object.

Parameters:
id - String value to use
Returns:
ModuleId with the underlying value of the long value parsed from id
Throws:
IllegalArgumentException - if id is null
NumberFormatException - if id does not contain a parsable long


Copyright © 2011 Atlassian. All Rights Reserved.