Class ModuleId

java.lang.Object
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 Details

    • 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