Class MapContext

    • Constructor Detail

      • MapContext

        public MapContext()
    • Method Detail

      • getTypedValue

        protected <E> E getTypedValue(String key,
                                      Class<E> type)
        Performs a get operation but additionally ensures that the value returned is of the specified type. If there is no value, null is returned.
        Type Parameters:
        E - the expected type of the value
        Parameters:
        key - the attribute key to look up a value
        type - the expected type of the value
        Returns:
        the typed value or null if the attribute does not exist.
      • nullSafePut

        protected void nullSafePut(String key,
                                   Object value)
        Places a value in this context map under the given key only if the given value argument is not null.
        Parameters:
        key - the attribute key under which the non-null value will be stored
        value - the non-null value to store. If null, this method does nothing and returns immediately.
      • size

        public int size()
      • isEmpty

        public boolean isEmpty()
      • containsKey

        public boolean containsKey(Object o)
      • containsValue

        public boolean containsValue(Object o)
      • putAll

        public void putAll(Map<? extends String,?> map)
      • clear

        public void clear()