Class SecuredValue<T>
- java.lang.Object
-
- com.github.toolarium.common.security.SecuredValue<T>
-
- All Implemented Interfaces:
ISecuredValue<T>,java.io.Serializable
public class SecuredValue<T> extends java.lang.Object implements ISecuredValue<T>
Implements theISecuredValue.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SecuredValue(T value)Constructor for SecuredValueSecuredValue(T value, java.lang.String securedValue)Constructor for SecuredValue
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)java.lang.StringgetSecuredValue()Get the secured value, e.g.TgetValue()Get the valueinthashCode()booleanhasSecuredValue()Check if it has a secured valueSecuredValue<T>setValue(T value)Sets the valueSecuredValue<T>setValue(T value, java.lang.String securedValue)Sets the valuejava.lang.StringtoString()
-
-
-
Method Detail
-
getValue
public T getValue()
Description copied from interface:ISecuredValueGet the value- Specified by:
getValuein interfaceISecuredValue<T>- Returns:
- the value
- See Also:
ISecuredValue.getValue()
-
setValue
public SecuredValue<T> setValue(T value)
Sets the value- Parameters:
value- the value- Returns:
- the secured value
-
setValue
public SecuredValue<T> setValue(T value, java.lang.String securedValue)
Sets the value- Parameters:
value- the valuesecuredValue- the secured value- Returns:
- the secured value
-
hasSecuredValue
public boolean hasSecuredValue()
Description copied from interface:ISecuredValueCheck if it has a secured value- Specified by:
hasSecuredValuein interfaceISecuredValue<T>- Returns:
- true if it has a secured value
- See Also:
ISecuredValue.hasSecuredValue()
-
getSecuredValue
public java.lang.String getSecuredValue()
Description copied from interface:ISecuredValueGet the secured value, e.g. to write into a log or a console- Specified by:
getSecuredValuein interfaceISecuredValue<T>- Returns:
- the secured value
- See Also:
ISecuredValue.getSecuredValue()
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object- See Also:
Object.hashCode()
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object- See Also:
Object.equals(java.lang.Object)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-