Package redempt.redlib.config.data
Class ListDataHolder
java.lang.Object
redempt.redlib.config.data.ListDataHolder
- All Implemented Interfaces:
DataHolder
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreateSubsection
(String path) Creates a subsection of this DataHolderGets the object mapped to the given pathgetKeys()
Gets a list subsectionGets a string value from a pathgetSubsection
(String path) Gets an existing subsection of this DataHolderboolean
Checks whether a given path has a value associatedvoid
Removes a mappingvoid
Sets the object at a given pathunwrap()
Unwraps the object this DataHolder wrapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface redempt.redlib.config.data.DataHolder
setComments
-
Constructor Details
-
ListDataHolder
-
ListDataHolder
public ListDataHolder()
-
-
Method Details
-
get
Description copied from interface:DataHolder
Gets the object mapped to the given path- Specified by:
get
in interfaceDataHolder
- Parameters:
path
- The path- Returns:
- The object mapped to the path
-
set
Description copied from interface:DataHolder
Sets the object at a given path- Specified by:
set
in interfaceDataHolder
- Parameters:
path
- The path to the objectobj
- The object to set
-
getSubsection
Description copied from interface:DataHolder
Gets an existing subsection of this DataHolder- Specified by:
getSubsection
in interfaceDataHolder
- Parameters:
path
- The path to the data- Returns:
- The subsection, or null
-
createSubsection
Description copied from interface:DataHolder
Creates a subsection of this DataHolder- Specified by:
createSubsection
in interfaceDataHolder
- Parameters:
path
- The path of the subsection to create- Returns:
- The created subsection
-
getKeys
- Specified by:
getKeys
in interfaceDataHolder
- Returns:
- All valid keys
-
isSet
Description copied from interface:DataHolder
Checks whether a given path has a value associated- Specified by:
isSet
in interfaceDataHolder
- Parameters:
path
- The path to check- Returns:
- Whether the path has an associated value
-
getString
Description copied from interface:DataHolder
Gets a string value from a path- Specified by:
getString
in interfaceDataHolder
- Parameters:
path
- The path to the string- Returns:
- The string
-
getList
Description copied from interface:DataHolder
Gets a list subsection- Specified by:
getList
in interfaceDataHolder
- Parameters:
path
- The path to the subsection- Returns:
- The list subsection, or null
-
remove
Description copied from interface:DataHolder
Removes a mapping- Specified by:
remove
in interfaceDataHolder
- Parameters:
path
- The path of the data to remove
-
unwrap
Description copied from interface:DataHolder
Unwraps the object this DataHolder wraps- Specified by:
unwrap
in interfaceDataHolder
- Returns:
- The wrapped storage
-