Package limn.scene

Interface FloatConsumer

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 FloatConsumer
The float callback the JDK does not have, for the widgets whose value is a float.

Consumer<Float> boxes on every drag frame, and DoubleConsumer — the JDK's nearest — widens the value, which would turn Math.round(v) into a long and stop other.setValue(v) compiling at every call site that passes one slider's value to another. One two-line interface keeps both.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    accept(float value)
     
  • Method Details

    • accept

      void accept(float value)
      Parameters:
      value - the new value