Class KarmaInputFile
java.lang.Object
ml.karmaconfigs.api.common.karmafile.KarmaInputFile
- All Implemented Interfaces:
Serializable
Karma file only for input stream and used only
to read
- See Also:
- Serialized Form
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull ObjectGet a valuebooleangetBoolean(String path, boolean def)Get a valuedoubleGet a valueintGet a valuegetKeys(boolean deep)Get the karma file key set@NotNull List<?>Get a valuelongGet a value@NotNull StringGet a valuegetStringList(String path, String... default_contents)Get a valuebooleanGet if a key is a listbooleanGet if a key is setRead the file completelytoString()Get the karma file as string
-
Constructor Details
-
KarmaInputFile
Initialize the karma file- Parameters:
stream- the file to read
-
-
Method Details
-
get
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
getString
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
getList
Get a value- Parameters:
path- the value pathdefault_contents- the default values- Returns:
- the value
-
getStringList
Get a value- Parameters:
path- the value pathdefault_contents- the default values- Returns:
- the value
-
readFullFile
Read the file completely- Returns:
- the file lines
-
getBoolean
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
isList
Get if a key is a list- Parameters:
path- the key- Returns:
- if the path is a list
-
isSet
Get if a key is set- Parameters:
path- the key- Returns:
- if the path is set
-
getInt
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
getDouble
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
getLong
Get a value- Parameters:
path- the value pathdef- the default value- Returns:
- the value
-
getKeys
Get the karma file key set- Parameters:
deep- include non-valued keys- Returns:
- the karma file keys
-
toString
Get the karma file as string
-