Class CompositeParametersProviderImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void appendParametersProvider​(ParametersProvider provider)
      Appends a provider to the end of providers list.
      boolean contains​(java.lang.String key)
      Returns true if this parameters provider contains specified key
      java.lang.String get​(java.lang.String key)
      Looks up a value corresponding to the key passed.
      java.util.Map<java.lang.String,​java.lang.String> getAll()
      Allows to get map of the provided parameters.
      int size()
      Returns the number of parameters in this parameters provider.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

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

      • CompositeParametersProviderImpl

        public CompositeParametersProviderImpl()
    • Method Detail

      • appendParametersProvider

        public void appendParametersProvider​(@NotNull
                                             ParametersProvider provider)
        Appends a provider to the end of providers list. Note that the values in the providers appended earlier will take precedence.
        Specified by:
        appendParametersProvider in interface CompositeParametersProvider
        Parameters:
        provider - the provider to append
      • get

        @Nullable
        public java.lang.String get​(@NotNull
                                    java.lang.String key)
        Looks up a value corresponding to the key passed. The providers are looked up in the order they were appended. So, if the key occurs in two providers, the one appended earlier will be used to get the value.
        Specified by:
        get in interface ParametersProvider
        Parameters:
        key - key to look for
        Returns:
        the value corresponding to the key passed from the first matching held provider
      • size

        public int size()
        Description copied from interface: ParametersProvider
        Returns the number of parameters in this parameters provider. This is the size of the map returned by getAll method.
        Specified by:
        size in interface ParametersProvider
      • getAll

        public java.util.Map<java.lang.String,​java.lang.String> getAll()
        Description copied from interface: ParametersProvider
        Allows to get map of the provided parameters. Note that get method can provide more parameters then are returned by this method. However, all the parameters returned by this method should also be available via get method.
        Specified by:
        getAll in interface ParametersProvider
        Returns:
        the map which has the same key-value pairs as the the provider
      • toString

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