Class PathStorage<T>
java.lang.Object
com.github.startsmercury.simply.no.shading.util.storage.PathStorage<T>
- Type Parameters:
T- the supported type for storing
- All Implemented Interfaces:
Storage<T>
- Direct Known Subclasses:
JsonPathStorage
A
PathStorage is an abstract implementation of Storage that
will act as a base for states accessed with Java NIO. This class overrides
the equals(Object), hashCode(), and toString(),
where getPath() is used instead of a direct field access;
null returns from the aforementioned #getPath() is properly
taken care of.- Since:
- 6.0.0
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedPathStorage(Path path) Creates a newPathStoragewith the assigned path to where states are read and written into. -
Method Summary
-
Constructor Details
-
PathStorage
Creates a newPathStoragewith the assigned path to where states are read and written into.- Parameters:
path- the assigned path to where states are read and written into- Implementation Note:
- It is the responsibility of implementing classes, when overriding,
in handling
nullas a parameter.
-
-
Method Details
-
equals
-
getPath
Returns the assigned path to where states are read and written into.- Returns:
- the assigned path to where states are read and written into
- Implementation Note:
- It is the responsibility of implementing classes, when overriding,
in handling
nulls .
-
hashCode
public int hashCode() -
toString
-