Interface MetaDataMap

  • All Superinterfaces:
    java.util.Map<java.lang.String,​java.lang.Object>
    All Known Implementing Classes:
    SimpleMetaDataMap

    public interface MetaDataMap
    extends java.util.Map<java.lang.String,​java.lang.Object>
    A value map for generic access to meta data values.
    • 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>
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T get​(java.lang.String name, java.lang.Class<T> type)
      Get a meta data property and make an attempt to convert it into the given type.
      <T> T get​(java.lang.String name, T defaultValue)
      Get a meta data property and make an attempt to convert it into the given type.
      • 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
    • Method Detail

      • get

        <T> T get​(java.lang.String name,
                  java.lang.Class<T> type)
        Get a meta data property and make an attempt to convert it into the given type.
        Type Parameters:
        T - the type of the class
        Parameters:
        name - The name of the meta data property
        type - The class of the type to use for conversion.
        Returns:
        The value of the property converted to type T or null if there is no such property or it cannot be converted to the given type.
      • get

        <T> T get​(java.lang.String name,
                  T defaultValue)
        Get a meta data property and make an attempt to convert it into the given type.
        Type Parameters:
        T - the type of the class
        Parameters:
        name - The name of the meta data property
        defaultValue - A default value to use in case the property does not exist or cannot be converted. The type to convert to is determined by the type of the default value. If the default value is null and a property for the given name exists, it is returned without conversion.
        Returns:
        The value of the property converted to type T or null if there is no such property or it cannot be converted to the given type.