Interface InheritanceValueMap

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface java.util.Map

        java.util.Map.Entry<K extends java.lang.Object,​V extends java.lang.Object>
    • Field Summary

      • Fields inherited from interface org.apache.sling.api.resource.ValueMap

        EMPTY
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T getInherited​(java.lang.String name, java.lang.Class<T> type)
      Get a named property and convert it into the given type, and take the properties of parent resources / pages into account, if the property is not found locally.
      <T> T getInherited​(java.lang.String name, T defaultValue)
      Get a named property and convert it into the given type, and take the properties of parent resources / pages into account, if the property is not found locally.
      • Methods inherited from interface java.util.Map

        clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
      • Methods inherited from interface org.apache.sling.api.resource.ValueMap

        get, get
    • Method Detail

      • getInherited

        <T> T getInherited​(java.lang.String name,
                           java.lang.Class<T> type)
        Get a named property and convert it into the given type, and take the properties of parent resources / pages into account, if the property is not found locally.

        The exact inheritance mechanism depends on the implementation.

        Type Parameters:
        T - type parameter
        Parameters:
        name - The name of the property
        type - The class of the type
        Returns:
        Return named value converted to type T or null if non existing or can't be converted.
      • getInherited

        <T> T getInherited​(java.lang.String name,
                           T defaultValue)
        Get a named property and convert it into the given type, and take the properties of parent resources / pages into account, if the property is not found locally.

        The exact inheritance mechanism depends on the implementation.

        Type Parameters:
        T - type parameter
        Parameters:
        name - The name of the property
        defaultValue - The default value to use if the named property does not exist or cannot be converted to the requested type. The default value is also used to define the type to convert the value to. If this is null any existing property is not converted.
        Returns:
        Return named value converted to type T or the default value if non existing or can't be converted.