10Duke Java Core
Loading...
Searching...
No Matches
tenduke.sdk.core.model.jwt.JwtMap Class Reference

Detailed Description

Implementation of a JWT object as a map.

Inheritance diagram for tenduke.sdk.core.model.jwt.JwtMap:

Public Member Functions

 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)
 

Protected Member Functions

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.
 

Constructor & Destructor Documentation

◆ 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
mapto copy all the values from to the new instance.

Member Function Documentation

◆ getString()

String tenduke.sdk.core.model.jwt.JwtMap.getString ( final String name)

Gets a value as a string from the map.

Parameters
namekey 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
skey for identifying the value to be put in the map.
ovalue 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
namekey for the value in the map.
dateobject 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
namekey for the value in the map.
valuevalue to be added to the map with corresponding key.

The documentation for this class was generated from the following file: