Package top.focess.qq.api.util.session
Class Session
- java.lang.Object
-
- top.focess.qq.api.util.session.Session
-
- All Implemented Interfaces:
Serializable,top.focess.util.SectionMap
- Direct Known Subclasses:
SessionSection
public class Session extends Object implements top.focess.util.SectionMap
This class is used to build better communication between Command and CommandSender. It can save something in the executing process and can be used for future.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcompute(String key, java.util.function.BiFunction<? super String,? super Object,?> remappingFunction)booleancontains(String key)booleancontainsSection(String key)SessionSectioncreateSection(String key)<T> Tget(String key)<T> TgetOrDefault(String key, T defaultValue)top.focess.util.SectionMapgetSection(String key)Map<String,Object>getValues()voidremove(String key)voidset(String key, Object value)StringtoString()
-
-
-
Method Detail
-
createSection
public SessionSection createSection(String key)
- Specified by:
createSectionin interfacetop.focess.util.SectionMap
-
getValues
public Map<String,Object> getValues()
- Specified by:
getValuesin interfacetop.focess.util.SectionMap
-
getSection
public top.focess.util.SectionMap getSection(String key)
- Specified by:
getSectionin interfacetop.focess.util.SectionMap
-
containsSection
public boolean containsSection(String key)
- Specified by:
containsSectionin interfacetop.focess.util.SectionMap
-
set
public void set(String key, Object value)
- Specified by:
setin interfacetop.focess.util.SectionMap
-
get
public <T> T get(String key)
- Specified by:
getin interfacetop.focess.util.SectionMap
-
getOrDefault
public <T> T getOrDefault(String key, T defaultValue)
- Specified by:
getOrDefaultin interfacetop.focess.util.SectionMap
-
contains
public boolean contains(String key)
- Specified by:
containsin interfacetop.focess.util.SectionMap
-
remove
public void remove(String key)
- Specified by:
removein interfacetop.focess.util.SectionMap
-
-