Module id.xfunction

Class ConstantSupplier<T>

Object
ConstantSupplier<T>
All Implemented Interfaces:
Supplier<T>

public class ConstantSupplier<T> extends Object implements Supplier<T>
Supplier for constant value.

It is possible to use ordinary lambda to supply constant values like () -> VALUE but the problem is that calling Object.toString() for such Supplier will not show the VALUE inside.

  • Constructor Details

    • ConstantSupplier

      public ConstantSupplier(T value)
  • Method Details