Package com.dtolabs.rundeck.core.rules
Class StateLogger
- java.lang.Object
-
- com.dtolabs.rundeck.core.rules.StateLogger
-
- All Implemented Interfaces:
MutableStateObj
,StateObj
public class StateLogger extends java.lang.Object implements MutableStateObj
Created by greg on 5/5/16.
-
-
Constructor Summary
Constructors Constructor Description StateLogger(MutableStateObj state, java.util.function.Consumer<java.lang.String> listener)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,java.lang.String>
getState()
boolean
hasState(StateObj statex)
boolean
hasState(java.lang.String key, java.lang.String value)
java.lang.String
toString()
boolean
updateState(StateObj values)
Add the state to this stateboolean
updateState(java.lang.String key, java.lang.String value)
Add the state to this stateboolean
updateState(java.util.Map<java.lang.String,java.lang.String> values)
Add the state to this state
-
-
-
Constructor Detail
-
StateLogger
public StateLogger(MutableStateObj state, java.util.function.Consumer<java.lang.String> listener)
-
-
Method Detail
-
getState
public java.util.Map<java.lang.String,java.lang.String> getState()
-
updateState
public boolean updateState(StateObj values)
Description copied from interface:MutableStateObj
Add the state to this state- Specified by:
updateState
in interfaceMutableStateObj
- Parameters:
values
- state- Returns:
- true if this state was changed, false otherwise
-
updateState
public boolean updateState(java.util.Map<java.lang.String,java.lang.String> values)
Description copied from interface:MutableStateObj
Add the state to this state- Specified by:
updateState
in interfaceMutableStateObj
- Parameters:
values
- state- Returns:
- true if this state was changed, false otherwise
-
updateState
public boolean updateState(java.lang.String key, java.lang.String value)
Description copied from interface:MutableStateObj
Add the state to this state- Specified by:
updateState
in interfaceMutableStateObj
- Parameters:
key
- keyvalue
- value- Returns:
- true if this state was changed, false otherwise
-
hasState
public boolean hasState(java.lang.String key, java.lang.String value)
-
hasState
public boolean hasState(StateObj statex)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-