Package step.functions.io
Class AbstractSession
- java.lang.Object
- 
- step.functions.io.AbstractSession
 
- 
- All Implemented Interfaces:
- Closeable,- AutoCloseable
 
 public class AbstractSession extends Object implements Closeable 
- 
- 
Field SummaryFields Modifier and Type Field Description protected Map<String,Object>sessionObjects
 - 
Constructor SummaryConstructors Constructor Description AbstractSession()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()<T> Tget(Class<T> objectClass)Objectget(String arg0)<T,U>
 TgetOrDefault(String key, Function<U,T> def, U param)Get a value from the sessionObject.<T> TgetOrDefault(String key, T def)Get a value from the sessionObject.voidput(Object object)Objectput(String arg0, Object arg1)
 
- 
- 
- 
Method Detail- 
getOrDefaultpublic <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.
 
 - 
getOrDefaultpublic <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.
 
 - 
getpublic <T> T get(Class<T> objectClass) 
 - 
putpublic void put(Object object) 
 - 
closepublic void close() - Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
 
 
- 
 
-