org.silverpeas.token
Class TokenGenerationParameter<T>

java.lang.Object
  extended by org.silverpeas.token.TokenGenerationParameter<T>
Type Parameters:
T - the concrete type of the parameter value.

public class TokenGenerationParameter<T>
extends Object

Parameters for customizing the generation of a token.


Nested Class Summary
static class TokenGenerationParameter.Builder
          A builder of a chain of different token generation parameters.
 
Constructor Summary
TokenGenerationParameter(String key, T value)
          Constructs the generation parameter with the specified key (the parameter name) and value.
 
Method Summary
static TokenGenerationParameter.Builder builder()
          Gets a builder of a chain of generation parameter.
 String key()
           
static
<T> TokenGenerationParameter<T>
params(String key, T value)
          Convenient method to create a generation parameter.
 T value()
          Gets this generation parameter value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenGenerationParameter

public TokenGenerationParameter(String key,
                                T value)
Constructs the generation parameter with the specified key (the parameter name) and value.

Parameters:
key - the parameter key.
value - the parameter value.
Method Detail

builder

public static TokenGenerationParameter.Builder builder()
Gets a builder of a chain of generation parameter.

Returns:
a builder of parameters.

params

public static <T> TokenGenerationParameter<T> params(String key,
                                                     T value)
Convenient method to create a generation parameter.

Type Parameters:
T - the type of the concrete parameter, id est the type of the value.
Parameters:
key - the parameter key.
value - the parameter value.
Returns:
a generation parameter.

key

public String key()

value

public T value()
Gets this generation parameter value.

Returns:
the value of this parameter.


Copyright © 2016 Silverpeas. All Rights Reserved.