APIdia Launch Partner
Top Fields Constructors Methods
sun.security.ec

public Class ParametersMap<T>

extends Object
Class Inheritance
Imports
sun.security.util.ObjectIdentifier, sun.security.x509.AlgorithmId, java.security.spec.AlgorithmParameterSpec, .NamedParameterSpec, java.util.Collections, .Locale, .Map, .HashMap, .Optional, java.util.function.Function, .Supplier

Field Summary

Modifier and TypeField and Description
private Map<String, T>
private Map<ObjectIdentifier, T>
private Map<Integer, T>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private static <A, B> Supplier<B>
apply(final Function<A, B> func, final A a)

public void
fix()

public <
the type of exception that is thrown
E extends Throwable
>
T

Returns:

the parameters for the specified algorithm ID
get
(Function<String, E>
a function that produces an exception from a string
exception
,
AlgorithmId
the algorithm ID
algId
)

Get parameters by algorithm ID, or throw an exception if no parameters are defined for the specified ID. This method is used in several contexts that should throw different exceptions when the parameters are not found.

public <
the type of exception that is thrown
E extends Throwable
>
T

Returns:

the parameters for the spec
get
(Function<String, E>
a function that produces an exception from a string
exception
,
AlgorithmParameterSpec
the algorithm parameters spec
params
)

Get parameters by algorithm parameter spec, or throw an exception if no parameters are defined for the spec.

public Optional<T>
public Optional<T>
public Optional<T>
getBySize(int size)

public <
the type of exception that is thrown
E extends Throwable
>
T

Returns:

the parameters for the specified key size
getBySize
(Function<String, E>
a function that produces an exception from a string
exception
,
int
the desired key size
size
)

Get parameters by key size, or throw an exception if no parameters are defined for the specified key size.

public void
put(String name, ObjectIdentifier oid, int size, T params)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

nameMapback to summary
private Map<String, T> nameMap
oidMapback to summary
private Map<ObjectIdentifier, T> oidMap
sizeMapback to summary
private Map<Integer, T> sizeMap

Constructor Detail

ParametersMapback to summary
public ParametersMap()

Method Detail

applyback to summary
private static <A, B> Supplier<B> apply(final Function<A, B> func, final A a)
fixback to summary
public void fix()
getback to summary
public <E extends Throwable> T get(Function<String, E> exception, AlgorithmId algId) throws AlgorithmId-:E

Get parameters by algorithm ID, or throw an exception if no parameters are defined for the specified ID. This method is used in several contexts that should throw different exceptions when the parameters are not found. The first argument is a function that produces the desired exception.

Parameters
<E>
the type of exception that is thrown
exception:Function<String, E>

a function that produces an exception from a string

algId:AlgorithmId

the algorithm ID

Returns:T

the parameters for the specified algorithm ID

Exceptions
AlgorithmId-:E:
when suitable parameters do not exist
getback to summary
public <E extends Throwable> T get(Function<String, E> exception, AlgorithmParameterSpec params) throws AlgorithmParameterSpec-:E

Get parameters by algorithm parameter spec, or throw an exception if no parameters are defined for the spec. This method is used in several contexts that should throw different exceptions when the parameters are not found. The first argument is a function that produces the desired exception.

Parameters
<E>
the type of exception that is thrown
exception:Function<String, E>

a function that produces an exception from a string

params:AlgorithmParameterSpec

the algorithm parameters spec

Returns:T

the parameters for the spec

Exceptions
AlgorithmParameterSpec-:E:
when suitable parameters do not exist
getByNameback to summary
public Optional<T> getByName(String name)
getByOidback to summary
public Optional<T> getByOid(ObjectIdentifier id)
getBySizeback to summary
public Optional<T> getBySize(int size)
getBySizeback to summary
public <E extends Throwable> T getBySize(Function<String, E> exception, int size) throws Function-int-:E

Get parameters by key size, or throw an exception if no parameters are defined for the specified key size. This method is used in several contexts that should throw different exceptions when the parameters are not found. The first argument is a function that produces the desired exception.

Parameters
<E>
the type of exception that is thrown
exception:Function<String, E>

a function that produces an exception from a string

size:int

the desired key size

Returns:T

the parameters for the specified key size

Exceptions
ParametersMap:T:
when suitable parameters do not exist
putback to summary
public void put(String name, ObjectIdentifier oid, int size, T params)