Package com.esturafd.jtoolkit.yml
Class PropertyMap<K,V>
- java.lang.Object
-
- java.util.AbstractMap<K,V>
-
- java.util.HashMap<K,V>
-
- com.esturafd.jtoolkit.yml.PropertyMap<K,V>
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Cloneable,java.util.Map<K,V>
public class PropertyMap<K,V> extends java.util.HashMap<K,V>Configuration importer mainly in map form, but can also be imported as a list or as a custom object. The ways to instantiate the configurations would be:
// Map MappropertyMap = new PropertyMap<>("config.yml"); // List List - See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description PropertyMap(java.lang.String path)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.ObjectfindProperties(java.io.File file)Find the YAML-based properties file, depends on the configuration, the object to return can be a Map, a list or a custom Objectstatic java.lang.ObjectfindProperties(java.lang.String path)Find the YAML-based properties file, depends on the configuration, the object to return can be a Map, a list or a custom Object-
Methods inherited from class java.util.HashMap
clear, clone, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, forEach, get, getOrDefault, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
-
-
-
-
Method Detail
-
findProperties
public static java.lang.Object findProperties(java.lang.String path)
Find the YAML-based properties file, depends on the configuration, the object to return can be a Map, a list or a custom Object- Returns:
- property structure
-
findProperties
public static java.lang.Object findProperties(java.io.File file)
Find the YAML-based properties file, depends on the configuration, the object to return can be a Map, a list or a custom Object- Returns:
- property structure
-
-