Class HidingContextVariables

    • Constructor Detail

      • HidingContextVariables

        public HidingContextVariables​(@NotNull
                                      ContextVariables provider,
                                      @Nullable
                                      Collection<String> allowedNames)
        Parameters:
        provider - the backing provider. It is not copied, a reference is kept.
        allowedNames - the set of names to allow. If 'null' - all are allowed
    • Method Detail

      • get

        @Nullable
        public Object get​(@NotNull
                          String name)
        Specified by:
        get in interface ContextVariables
        Parameters:
        name - the name of the variable
        Returns:
        the variable stored or null is the variable with the name cannot be found.
      • size

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

        public void setAllowedNames​(@Nullable
                                    Collection<String> allowedNames)