Implementation of a JWT object as a map.
|
| JwtMap () |
| No argument constructor initializes a new map to hold the JWT.
|
|
| JwtMap (final Map< String, ?> map) |
| Initializes a new map to hold the JWT and then adds all values from given map to it.
|
|
String | getString (final String name) |
| Gets a value as a string from the map.
|
|
int | size () |
|
boolean | isEmpty () |
|
boolean | containsKey (final Object o) |
|
boolean | containsValue (final Object o) |
|
Object | get (final Object o) |
|
Object | put (final String s, final Object o) |
| Adds the given value to the map holding JWTs with given key.
|
|
Object | remove (final Object o) |
|
void | putAll (final Map<? extends String, ?> m) |
|
void | clear () |
| Clears the map holding JWTs.
|
|
Set< String > | keySet () |
|
Collection< Object > | values () |
|
Set< Map.Entry< String, Object > > | entrySet () |
|
String | toString () |
|
int | hashCode () |
|
boolean | equals (final Object obj) |
|
|
void | setValue (final String name, final Object value) |
| Sets an object as the value for given key to the map.
|
|
Object | setDateAsSeconds (final String name, final Date date) |
| Sets a map value with a date converted as seconds.
|
|
◆ JwtMap()
tenduke.sdk.core.model.jwt.JwtMap.JwtMap |
( |
final Map< String, ?> | map | ) |
|
Initializes a new map to hold the JWT and then adds all values from given map to it.
- Parameters
-
map | to copy all the values from to the new instance. |
◆ getString()
String tenduke.sdk.core.model.jwt.JwtMap.getString |
( |
final String | name | ) |
|
Gets a value as a string from the map.
- Parameters
-
name | key for getting the value. |
- Returns
- found value or otherwise null.
◆ put()
Object tenduke.sdk.core.model.jwt.JwtMap.put |
( |
final String | s, |
|
|
final Object | o ) |
Adds the given value to the map holding JWTs with given key.
- Parameters
-
s | key for identifying the value to be put in the map. |
o | value to be put in the map. If value is null, the previously existing value is removed from the map with the same key. |
- Returns
- the value put into the map or the map that was previously found in case a null value was provided.
◆ putAll()
void tenduke.sdk.core.model.jwt.JwtMap.putAll |
( |
final Map<? extends String, ?> | m | ) |
|
If given map is empty, this method returns without modifying the underlying map.
◆ setDateAsSeconds()
Object tenduke.sdk.core.model.jwt.JwtMap.setDateAsSeconds |
( |
final String | name, |
|
|
final Date | date ) |
|
protected |
Sets a map value with a date converted as seconds.
- Parameters
-
name | key for the value in the map. |
date | object to be converted to seconds since EPOCH. Using null removes the element from the map. |
- Returns
- put value.
◆ setValue()
void tenduke.sdk.core.model.jwt.JwtMap.setValue |
( |
final String | name, |
|
|
final Object | value ) |
|
protected |
Sets an object as the value for given key to the map.
- Parameters
-
name | key for the value in the map. |
value | value to be added to the map with corresponding key. |
The documentation for this class was generated from the following file:
- model/src/main/java/tenduke/sdk/core/model/jwt/JwtMap.java