Class OriginTrackedMapPropertySource

All Implemented Interfaces:
OriginLookup<String>

public final class OriginTrackedMapPropertySource extends MapPropertySource implements OriginLookup<String>
OriginLookup backed by a Map containing OriginTrackedValues.
Since:
2.0.0
Author:
Madhura Bhave, Phillip Webb
See Also:
  • Constructor Details

    • OriginTrackedMapPropertySource

      public OriginTrackedMapPropertySource(String name, Map source)
      Create a new OriginTrackedMapPropertySource instance.
      Parameters:
      name - the property source name
      source - the underlying map source
    • OriginTrackedMapPropertySource

      public OriginTrackedMapPropertySource(String name, Map source, boolean immutable)
      Create a new OriginTrackedMapPropertySource instance.
      Parameters:
      name - the property source name
      source - the underlying map source
      immutable - if the underlying source is immutable and guaranteed not to change
      Since:
      2.2.0
  • Method Details

    • getProperty

      public Object getProperty(String name)
      Overrides:
      getProperty in class MapPropertySource
    • getOrigin

      public Origin getOrigin(String name)
      Description copied from interface: OriginLookup
      Return the origin of the given key or null if the origin cannot be determined.
      Specified by:
      getOrigin in interface OriginLookup<String>
      Parameters:
      name - the key to lookup
      Returns:
      the origin of the key or null
    • isImmutable

      public boolean isImmutable()
      Description copied from interface: OriginLookup
      Return true if this lookup is immutable and has contents that will never change.
      Specified by:
      isImmutable in interface OriginLookup<String>
      Returns:
      if the lookup is immutable