Class Urn

java.lang.Object
com.sportradar.utils.Urn

public class Urn extends Object
Represents a Uniform Resource Name
  • Constructor Details

    • Urn

      public Urn(String prefix, String type, long id)
      Initializes a new instance of the Urn class
      Parameters:
      prefix - - prefix of the URN
      type - - type of the resource associated with the URN
      id - - numerical identifier of the resource associated with the URN
  • Method Details

    • parse

      public static Urn parse(String urnString)
      Constructs a Urn instance by parsing the provided String
      Parameters:
      urnString - - String representation of the URN
      Returns:
      the Urn constructed by parsing the provided string representation
    • getPrefix

      public String getPrefix()
      Returns the prefix of the current instance
      Returns:
      the prefix of the current instance
    • getType

      public String getType()
      Returns the type of the resource associated with the current instance
      Returns:
      the type of the resource associated with the current instance
    • getId

      public long getId()
      Returns the numerical part of the identifier associated with the current instance
      Returns:
      the numerical part of the identifier associated with the current instance
    • getGroup

      public ResourceTypeGroup getGroup()
      Returns the ResourceTypeGroup enum member describing the group of the current instance
      Returns:
      the ResourceTypeGroup enum member describing the group of the current instance
    • equals

      public boolean equals(Object obj)
      Determines whether the specified Object is equal to this instance
      Overrides:
      equals in class Object
      Parameters:
      obj - - object to compare with the current object
      Returns:
      - true if the specified Object is equal to this instance; otherwise false
    • toString

      public String toString()
      Returns a String that represents this instance
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Returns a hash code for this instance
      Overrides:
      hashCode in class Object
    • isSimpleTeam

      public boolean isSimpleTeam()
    • isSimpleTeam

      public static boolean isSimpleTeam(String urn)