-
public final class UserStateThe user state.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classUserState.Companion
-
Field Summary
Fields Modifier and Type Field Description private BooleanprofileLoadedprivate BooleanbotDisabledprivate final InstantcreationDateprivate final Map<String, TimeBoxedFlag>flags
-
Constructor Summary
Constructors Constructor Description UserState(Instant creationDate, Map<String, TimeBoxedFlag> flags)
-
Method Summary
Modifier and Type Method Description final Unitcleanup()Cleanup the state. final StringgetFlag(String flag)final BooleanhasFlag(String flag)final UnitsetFlag(String flag, Long timeoutInMinutes, String value)final UnitsetFlag(String flag, Duration timeoutDuration, String value)final UnitremoveFlag(String flag)final UnitsetUnlimitedFlag(String flag, String value)final Instantcomponent1()final Map<String, TimeBoxedFlag>component2()final UserStatecopy(Instant creationDate, Map<String, TimeBoxedFlag> flags)final BooleangetProfileLoaded()final BooleangetBotDisabled()final InstantgetCreationDate()The user creation date. final Map<String, TimeBoxedFlag>getFlags()The flag for this user - useful to store basic information about this user. final UnitsetProfileLoaded(Boolean profileLoaded)final UnitsetBotDisabled(Boolean botDisabled)-
-
Constructor Detail
-
UserState
UserState(Instant creationDate, Map<String, TimeBoxedFlag> flags)
-
-
Method Detail
-
removeFlag
final Unit removeFlag(String flag)
-
setUnlimitedFlag
final Unit setUnlimitedFlag(String flag, String value)
-
component1
final Instant component1()
-
component2
final Map<String, TimeBoxedFlag> component2()
-
getProfileLoaded
final Boolean getProfileLoaded()
-
getBotDisabled
final Boolean getBotDisabled()
-
getCreationDate
final Instant getCreationDate()
The user creation date.
-
getFlags
final Map<String, TimeBoxedFlag> getFlags()
The flag for this user - useful to store basic information about this user.
-
setProfileLoaded
final Unit setProfileLoaded(Boolean profileLoaded)
-
setBotDisabled
final Unit setBotDisabled(Boolean botDisabled)
-
-
-
-