Package org.apache.cassandra.config
Class Properties
java.lang.Object
org.apache.cassandra.config.Properties
Utility class for working with
Property types.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic org.yaml.snakeyaml.introspector.PropertyandThen(org.yaml.snakeyaml.introspector.Property root, org.yaml.snakeyaml.introspector.Property leaf) Given two properties (root, leaf), calls first go through root and passed to leaf.static org.yaml.snakeyaml.introspector.PropertyandThen(org.yaml.snakeyaml.introspector.Property root, org.yaml.snakeyaml.introspector.Property leaf, String delimiter) Given two properties (root, leaf), calls first go through root and passed to leaf.static LoaderGiven a map of Properties, takes any "nested" property (non primitive, value-type, or collection), and expands them, producing 1 or more Properties.flatten(Loader loader, Map<String, org.yaml.snakeyaml.introspector.Property> input, String delimiter) Given a map of Properties, takes any "nested" property (non primitive, value-type, or collection), and expands them, producing 1 or more Properties.static booleanisCollection(org.yaml.snakeyaml.introspector.Property prop) static booleanisPrimitive(org.yaml.snakeyaml.introspector.Property prop) static org.yaml.snakeyaml.introspector.Property
-
Field Details
-
DELIMITER
- See Also:
-
-
Method Details
-
andThen
public static org.yaml.snakeyaml.introspector.Property andThen(org.yaml.snakeyaml.introspector.Property root, org.yaml.snakeyaml.introspector.Property leaf, String delimiter) Given two properties (root, leaf), calls first go through root and passed to leaf.leaf.get(root.get(o))- Parameters:
root- first property in the chainleaf- last property in the chaindelimiter- for joining names- Returns:
- new Property which combines root -> leaf
-
andThen
public static org.yaml.snakeyaml.introspector.Property andThen(org.yaml.snakeyaml.introspector.Property root, org.yaml.snakeyaml.introspector.Property leaf) Given two properties (root, leaf), calls first go through root and passed to leaf.leaf.get(root.get(o))- Parameters:
root- first property in the chainleaf- last property in the chain- Returns:
- new Property which combines root -> leaf
-
flatten
public static Map<String,org.yaml.snakeyaml.introspector.Property> flatten(Loader loader, Map<String, org.yaml.snakeyaml.introspector.Property> input) Given a map of Properties, takes any "nested" property (non primitive, value-type, or collection), and expands them, producing 1 or more Properties.- Parameters:
loader- for mapping type to map of propertiesinput- map to flatten- Returns:
- map of all flattened properties
-
flatten
public static Map<String,org.yaml.snakeyaml.introspector.Property> flatten(Loader loader, Map<String, org.yaml.snakeyaml.introspector.Property> input, String delimiter) Given a map of Properties, takes any "nested" property (non primitive, value-type, or collection), and expands them, producing 1 or more Properties.- Parameters:
loader- for mapping type to map of propertiesinput- map to flattendelimiter- for joining names- Returns:
- map of all flattened properties
-
isCollection
public static boolean isCollection(org.yaml.snakeyaml.introspector.Property prop) - Returns:
- true if proeprty type is a collection
-
isPrimitive
public static boolean isPrimitive(org.yaml.snakeyaml.introspector.Property prop) - Returns:
- true if property type is a primitive, or well known value type (may return false for user defined value types)
-
defaultLoader
- Returns:
- default implementation of
Loader
-
rename
public static org.yaml.snakeyaml.introspector.Property rename(String newName, org.yaml.snakeyaml.introspector.Property prop) - Returns:
- a new property with an updated name
-