Class ConfigSet

  • All Implemented Interfaces:
    ConfigSource

    public class ConfigSet
    extends java.lang.Object
    implements ConfigSource
    Config source as a programmatically built set of ConfigInstances
    Author:
    Vegard Havdal
    • Constructor Summary

      Constructors 
      Constructor Description
      ConfigSet()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addBuilder​(java.lang.String configId, com.yahoo.config.ConfigInstance.Builder builder)
      Inserts a new builder in this set.
      boolean contains​(ConfigKey<?> key)
      Returns true if this set contains a config instance matching the given key
      com.yahoo.config.ConfigInstance.Builder get​(ConfigKey<?> key)
      Returns a Builder matching the given key, or null if no match
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • ConfigSet

        public ConfigSet()
    • Method Detail

      • addBuilder

        public void addBuilder​(java.lang.String configId,
                               com.yahoo.config.ConfigInstance.Builder builder)
        Inserts a new builder in this set. If an existing entry exists, it is overwritten.
        Parameters:
        configId - The config id for this builder.
        builder - The builder that will produce config for the particular config id.
      • get

        public com.yahoo.config.ConfigInstance.Builder get​(ConfigKey<?> key)
        Returns a Builder matching the given key, or null if no match
        Parameters:
        key - a config key to get a Builder for
        Returns:
        a ConfigInstance
      • contains

        public boolean contains​(ConfigKey<?> key)
        Returns true if this set contains a config instance matching the given key
        Parameters:
        key - a config key
        Returns:
        a ConfigInstance
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object