Skip to content

Commit

Permalink
Add FunctionContext::toStream() -> DoubleStream
Browse files Browse the repository at this point in the history
  • Loading branch information
FourteenBrush committed Jun 10, 2024
1 parent 46fb491 commit 810b78e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import me.fourteendoggo.mathexpressionparser.utils.Utility;

import java.util.Arrays;
import java.util.stream.DoubleStream;

// FIXME: implement PrimitiveIterator.OfDouble maybe?
/**
Expand Down Expand Up @@ -149,6 +150,10 @@ public double getDouble(int idx) {
return parameters[idx];
}

public DoubleStream toStream() {
return DoubleStream.of(parameters);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder("[");
Expand Down

0 comments on commit 810b78e

Please sign in to comment.