Class Properties


  • public final class Properties
    extends java.lang.Object
    Utility class for working with Property types.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DELIMITER  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      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.
      static org.yaml.snakeyaml.introspector.Property andThen​(org.yaml.snakeyaml.introspector.Property root, org.yaml.snakeyaml.introspector.Property leaf, java.lang.String delimiter)
      Given two properties (root, leaf), calls first go through root and passed to leaf.
      static Loader defaultLoader()  
      static java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> flatten​(Loader loader, java.util.Map<java.lang.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.
      static java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> flatten​(Loader loader, java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> input, java.lang.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 boolean isCollection​(org.yaml.snakeyaml.introspector.Property prop)  
      static boolean isPrimitive​(org.yaml.snakeyaml.introspector.Property prop)  
      static org.yaml.snakeyaml.introspector.Property rename​(java.lang.String newName, org.yaml.snakeyaml.introspector.Property prop)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • andThen

        public static org.yaml.snakeyaml.introspector.Property andThen​(org.yaml.snakeyaml.introspector.Property root,
                                                                       org.yaml.snakeyaml.introspector.Property leaf,
                                                                       java.lang.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 chain
        leaf - last property in the chain
        delimiter - 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 chain
        leaf - last property in the chain
        Returns:
        new Property which combines root -> leaf
      • flatten

        public static java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> flatten​(Loader loader,
                                                                                                             java.util.Map<java.lang.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 properties
        input - map to flatten
        Returns:
        map of all flattened properties
      • flatten

        public static java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> flatten​(Loader loader,
                                                                                                             java.util.Map<java.lang.String,​org.yaml.snakeyaml.introspector.Property> input,
                                                                                                             java.lang.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 properties
        input - map to flatten
        delimiter - 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

        public static Loader defaultLoader()
        Returns:
        default implementation of Loader
      • rename

        public static org.yaml.snakeyaml.introspector.Property rename​(java.lang.String newName,
                                                                      org.yaml.snakeyaml.introspector.Property prop)
        Returns:
        a new property with an updated name