Package org.wildfly.security.pem
Class PemEntry<T>
- java.lang.Object
-
- org.wildfly.security.pem.PemEntry<T>
-
- Type Parameters:
T
- the entry type
public final class PemEntry<T> extends Object
An entry in a PEM file or stream.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getEntry()
Get the entry value.<U> U
tryCast(Class<U> clazz)
Try to cast this entry's value to the given type.
-
-
-
Field Detail
-
entry
private final T entry
-
-
Constructor Detail
-
PemEntry
public PemEntry(T entry)
Construct a new instance.- Parameters:
entry
- the entry value (notnull
)
-
-
Method Detail
-
getEntry
public T getEntry()
Get the entry value.- Returns:
- the entry value (not
null
)
-
tryCast
public <U> U tryCast(Class<U> clazz)
Try to cast this entry's value to the given type.- Type Parameters:
U
- the type to attempt to cast to- Parameters:
clazz
- the type class to attempt to cast to (notnull
)- Returns:
- the cast value, or
null
if the type does not match
-
-