Class AbstractSession

    • Constructor Detail

      • AbstractSession

        public AbstractSession()
    • Method Detail

      • getOrDefault

        public <T> T getOrDefault​(String key,
                                  T def)
        Get a value from the sessionObject. If the value does not exist set the given default value.
        Type Parameters:
        T - The type of the return value.
        Parameters:
        key - The key to search in the sessionObjects Map.
        def - The default value to use if the value does not exist.
        Returns:
        The value from sessionObjects or the default value.
      • getOrDefault

        public <T,​U> T getOrDefault​(String key,
                                          Function<U,​T> def,
                                          U param)
        Get a value from the sessionObject. If the value does not exist set the given default value.
        Type Parameters:
        T - The type of the return value.
        U - The type of the parameter for the default function.
        Parameters:
        key - The key to search in the sessionObjects Map.
        def - The function to apply for the default value.
        param - The parameter for the default function.
        Returns:
        The value from sessionObjects or the default value.
      • get

        public <T> T get​(Class<T> objectClass)
      • put

        public void put​(Object object)