Interface Factory<T>

Type Parameters:
T - type of object this factory will create
All Superinterfaces:
Supplier<T>
All Known Subinterfaces:
BuiltinFactory<T>, CipherFactory, CompressionFactory, DigestFactory, IoHandlerFactory, MacFactory, NamedFactory<T>, RandomFactory, SignatureFactory
All Known Implementing Classes:
AbstractRandomFactory, BouncyCastleRandomFactory, BuiltinCiphers, BuiltinCompressions, BuiltinDigests, BuiltinIoServiceFactoryFactories, BuiltinMacs, BuiltinSignatures, BuiltinUserAuthFactories, BuiltinUserAuthFactories, CompressionConfigValue, JceRandomFactory, KnownHostDigest, SingletonRandomFactory
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface Factory<T> extends Supplier<T>
Factory is a simple interface that is used to create other objects.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    default T
    get()
     
  • Method Details

    • get

      default T get()
      Specified by:
      get in interface Supplier<T>
    • create

      T create()
      Returns:
      A new instance