Class GameID


  • public class GameID
    extends java.lang.Object
    This 64bit structure represents an app, mod, shortcut, or p2p file on the Steam network.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  GameID.GameType
      Represents various types of games.
    • Constructor Summary

      Constructors 
      Constructor Description
      GameID()
      Initializes a new instance of the GameID class.
      GameID​(int nAppId)
      Initializes a new instance of the GameID class.
      GameID​(int nAppId, java.lang.String modPath)
      Initializes a new instance of the GameID class.
      GameID​(long id)
      Initializes a new instance of the GameID class.
      GameID​(java.lang.String exePath, java.lang.String appName)
      Initializes a new instance of the GameID class.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      long convertToUInt64()
      Converts this GameID into it's 64bit integer form.
      boolean equals​(java.lang.Object obj)
      Determines whether the specified Object is equal to this instance.
      int getAppID()
      Gets the app id.
      GameID.GameType getAppType()
      Gets the type of the app.
      long getModID()
      Gets the mod id.
      int hashCode()
      Returns a hash code for this instance.
      boolean isMod()
      Gets a value indicating whether this instance is a mod.
      boolean isP2PFile()
      Gets a value indicating whether this instance is a peer-to-peer file.
      boolean isShortcut()
      Gets a value indicating whether this instance is a shortcut.
      boolean isSteamApp()
      Gets a value indicating whether this instance is a steam app.
      void set​(long gameId)
      Sets the various components of this GameID from a 64bit integer form.
      void setAppID​(int value)
      Sets the app id.
      void setAppType​(GameID.GameType value)
      Sets the type of the app.
      void setFromUInt64​(long longSteamId)
      Sets the various components of this GameID from a 64bit integer form.
      void setModID​(long value)
      Sets the mod id.
      java.lang.String toString()
      Returns a String that represents this instance.
      long toUInt64()
      Converts this GameID into it's 64bit integer form.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GameID

        public GameID()
        Initializes a new instance of the GameID class.
      • GameID

        public GameID​(long id)
        Initializes a new instance of the GameID class.
        Parameters:
        id - The 64bit integer to assign this GameID from.
      • GameID

        public GameID​(int nAppId)
        Initializes a new instance of the GameID class.
        Parameters:
        nAppId - The 32bit app id to assign this GameID from.
      • GameID

        public GameID​(int nAppId,
                      java.lang.String modPath)
        Initializes a new instance of the GameID class.
        Parameters:
        nAppId - The base app id of the mod.
        modPath - The game folder name of the mod.
      • GameID

        public GameID​(java.lang.String exePath,
                      java.lang.String appName)
        Initializes a new instance of the GameID class.
        Parameters:
        exePath - The path to the executable, usually quoted.
        appName - The name of the application shortcut.
    • Method Detail

      • set

        public void set​(long gameId)
        Sets the various components of this GameID from a 64bit integer form.
        Parameters:
        gameId - The 64bit integer to assign this GameID from.
      • toUInt64

        public long toUInt64()
        Converts this GameID into it's 64bit integer form.
        Returns:
        A 64bit integer representing this GameID.
      • setAppID

        public void setAppID​(int value)
        Sets the app id.
        Parameters:
        value - The app ID.
      • getAppID

        public int getAppID()
        Gets the app id.
        Returns:
        The app ID.
      • setAppType

        public void setAppType​(GameID.GameType value)
        Sets the type of the app.
        Parameters:
        value - The type of the app.
      • getAppType

        public GameID.GameType getAppType()
        Gets the type of the app.
        Returns:
        The type of the app.
      • setModID

        public void setModID​(long value)
        Sets the mod id.
        Parameters:
        value - The mod ID.
      • getModID

        public long getModID()
        Gets the mod id.
        Returns:
        The mod ID.
      • isMod

        public boolean isMod()
        Gets a value indicating whether this instance is a mod.
        Returns:
        true if this instance is a mod; otherwise, false.
      • isShortcut

        public boolean isShortcut()
        Gets a value indicating whether this instance is a shortcut.
        Returns:
        true if this instance is a shortcut; otherwise, false.
      • isP2PFile

        public boolean isP2PFile()
        Gets a value indicating whether this instance is a peer-to-peer file.
        Returns:
        true if this instance is a p2p file; otherwise, false.
      • isSteamApp

        public boolean isSteamApp()
        Gets a value indicating whether this instance is a steam app.
        Returns:
        true if this instance is a steam app; otherwise, false.
      • setFromUInt64

        public void setFromUInt64​(long longSteamId)
        Sets the various components of this GameID from a 64bit integer form.
        Parameters:
        longSteamId - The 64bit integer to assign this GameID from.
      • convertToUInt64

        public long convertToUInt64()
        Converts this GameID into it's 64bit integer form.
        Returns:
        A 64bit integer representing this GameID.
      • equals

        public boolean equals​(java.lang.Object obj)
        Determines whether the specified Object is equal to this instance.
        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The Object to compare with this instance.
        Returns:
        true if the specified Object is equal to this instance; otherwise, false.
      • hashCode

        public int hashCode()
        Returns a hash code for this instance.
        Overrides:
        hashCode in class java.lang.Object
        Returns:
        A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table.
      • toString

        public java.lang.String toString()
        Returns a String that represents this instance.
        Overrides:
        toString in class java.lang.Object
        Returns:
        A String that represents this instance.