Skip to content

Convert to Java 1.8 only.#7

Open
samskivert wants to merge 5 commits intomasterfrom
2.x
Open

Convert to Java 1.8 only.#7
samskivert wants to merge 5 commits intomasterfrom
2.x

Conversation

@samskivert
Copy link
Copy Markdown
Member

  • Changes the Listener abstract classes into interfaces with default methods.

  • Isolates SignalView.Listener from ValueView.Listener and makes Slot into a
    functional interface that works for both.

  • Eliminates Functions because that can be done with lambdas more concisely
    than the Functions helpers.

  • Moves Slots statics into Slot since interfaces can have static methods now.

  • Eliminates UnitSlot as it's easy enough to have an ignored parameter in a
    lambda (and Java 9/10 will allow use of _ parameter). UnitSignal becomes
    Signal.Unit to reduce top-level namespace names.

  • Removes various methods/helpers that existed only to save boilerplate which
    is now better accomplished via lambdas and/or bound methods.
    RPromise.completer, for example, which can now be expressed as p::complete.

  • Moves Closeable.Util helpers into Closeable because we can have static
    members of interfaces now.

- Changes the Listener abstract classes into interfaces with default methods.

- Isolates SignalView.Listener from ValueView.Listener and makes Slot into a
  functional interface that works for both.

- Eliminates Functions because that can be done with lambdas more concisely
  than the Functions helpers.

- Moves Slots statics into Slot since interfaces can have static methods now.

- Eliminates UnitSlot as it's easy enough to have an ignored parameter in a
  lambda (and Java 9/10 will allow use of _ parameter). UnitSignal becomes
  Signal.Unit to reduce top-level namespace names.

- Removes various methods/helpers that existed only to save boilerplate which
  is now better accomplished via lambdas and/or bound methods.
  RPromise.completer, for example, which can now be expressed as p::complete.

- Moves Closeable.Util helpers into Closeable because we can have static
  members of interfaces now.
Android requires API 24 for the java.util.function package and RoboVM doesn't
include it at all. We'll have to forgo that particular slice of the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant