Package in.dragonbra.javasteam.types
Class GameID
- java.lang.Object
-
- in.dragonbra.javasteam.types.GameID
-
public class GameID extends java.lang.ObjectThis 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 classGameID.GameTypeRepresents various types of games.
-
Constructor Summary
Constructors Constructor Description GameID()Initializes a new instance of theGameIDclass.GameID(int nAppId)Initializes a new instance of theGameIDclass.GameID(int nAppId, java.lang.String modPath)Initializes a new instance of theGameIDclass.GameID(long id)Initializes a new instance of theGameIDclass.GameID(java.lang.String exePath, java.lang.String appName)Initializes a new instance of theGameIDclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longconvertToUInt64()Converts this GameID into it's 64bit integer form.booleanequals(java.lang.Object obj)Determines whether the specifiedObjectis equal to this instance.intgetAppID()Gets the app id.GameID.GameTypegetAppType()Gets the type of the app.longgetModID()Gets the mod id.inthashCode()Returns a hash code for this instance.booleanisMod()Gets a value indicating whether this instance is a mod.booleanisP2PFile()Gets a value indicating whether this instance is a peer-to-peer file.booleanisShortcut()Gets a value indicating whether this instance is a shortcut.booleanisSteamApp()Gets a value indicating whether this instance is a steam app.voidset(long gameId)Sets the various components of this GameID from a 64bit integer form.voidsetAppID(int value)Sets the app id.voidsetAppType(GameID.GameType value)Sets the type of the app.voidsetFromUInt64(long longSteamId)Sets the various components of this GameID from a 64bit integer form.voidsetModID(long value)Sets the mod id.java.lang.StringtoString()Returns aStringthat represents this instance.longtoUInt64()Converts this GameID into it's 64bit integer form.
-
-
-
Constructor Detail
-
GameID
public GameID()
Initializes a new instance of theGameIDclass.
-
GameID
public GameID(long id)
Initializes a new instance of theGameIDclass.- Parameters:
id- The 64bit integer to assign this GameID from.
-
GameID
public GameID(int nAppId)
Initializes a new instance of theGameIDclass.- 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 theGameIDclass.- 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 theGameIDclass.- 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 specifiedObjectis equal to this instance.- Overrides:
equalsin classjava.lang.Object- Parameters:
obj- TheObjectto compare with this instance.- Returns:
- true if the specified
Objectis equal to this instance; otherwise, false.
-
hashCode
public int hashCode()
Returns a hash code for this instance.- Overrides:
hashCodein classjava.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 aStringthat represents this instance.- Overrides:
toStringin classjava.lang.Object- Returns:
- A
Stringthat represents this instance.
-
-