Package me.hsgamer.hscore.config
Class PathString
java.lang.Object
me.hsgamer.hscore.config.PathString
The path string to use in
Config-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappend(PathString pathString) Create a new path string by appending the path string to the current path stringbooleanGet the last pathString[]getPath()Get the pathObject[]Get the path as object arrayinthashCode()booleanisRoot()Check if the path is empty.static StringtoPath(String separator, PathString pathString) Join the path with the separatortoPathMap(String separator, Map<PathString, Object> map) Join the path with the separatorstatic PathStringtoPathString(String separator, String path) Split the path with the separatorstatic Map<PathString,Object> toPathStringMap(String separator, Map<String, Object> map) Split the path with the separator
-
Field Details
-
ROOT
The root path
-
-
Constructor Details
-
PathString
Create a new path string- Parameters:
path- the path
-
-
Method Details
-
toPath
Join the path with the separator- Parameters:
separator- the separatorpathString- the path string- Returns:
- the joined path
-
toPathString
Split the path with the separator- Parameters:
separator- the separatorpath- the path- Returns:
- the path string
-
toPathMap
Join the path with the separator- Parameters:
separator- the separatormap- the map containing the path string- Returns:
- the map containing the joined path
-
toPathStringMap
Split the path with the separator- Parameters:
separator- the separatormap- the map containing the path- Returns:
- the map containing the path string
-
getPath
Get the path- Returns:
- the path
-
getPathAsObject
Get the path as object array- Returns:
- the path as object array
-
isRoot
public boolean isRoot()Check if the path is empty. It means that the path isROOT- Returns:
- true if the path is empty
-
getLastPath
Get the last path- Returns:
- the last path
-
append
Create a new path string by appending the path string to the current path string- Parameters:
pathString- the path string to append- Returns:
- the new path string
-
equals
-
hashCode
public int hashCode()
-