Class PemEntry<T>

  • Type Parameters:
    T - the entry type

    public final class PemEntry<T>
    extends Object
    An entry in a PEM file or stream.
    • Field Detail

      • entry

        private final T entry
    • Constructor Detail

      • PemEntry

        public PemEntry​(T entry)
        Construct a new instance.
        Parameters:
        entry - the entry value (not null)
    • 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 (not null)
        Returns:
        the cast value, or null if the type does not match