public final class TensorStreamMappers
extends java.lang.Object
Function
s to be used to map() a stream of Entry<Position, T>
. Using these
convenience functions avoids the user having to explicitly extract the Entry, modify it and re-build it in the end.Modifier and Type | Method and Description |
---|---|
static <T,CI,CO> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> |
coordinatesOfType(java.lang.Class<CI> dimension,
java.util.function.Function<CI,CO> coordinateMapper) |
static <T> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> |
positions(java.util.function.BiFunction<Position,T,Position> positionMapper) |
static <T> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> |
positions(java.util.function.Function<Position,Position> positionMapper) |
static <I,O> java.util.function.Function<java.util.Map.Entry<Position,I>,java.util.Map.Entry<Position,O>> |
values(java.util.function.BiFunction<Position,I,O> valueMapper) |
static <I,O> java.util.function.Function<java.util.Map.Entry<Position,I>,java.util.Map.Entry<Position,O>> |
values(java.util.function.Function<I,O> valueMapper) |
public static <T,CI,CO> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> coordinatesOfType(java.lang.Class<CI> dimension, java.util.function.Function<CI,CO> coordinateMapper)
public static <T> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> positions(java.util.function.Function<Position,Position> positionMapper)
public static <I,O> java.util.function.Function<java.util.Map.Entry<Position,I>,java.util.Map.Entry<Position,O>> values(java.util.function.Function<I,O> valueMapper)
public static <T> java.util.function.Function<java.util.Map.Entry<Position,T>,java.util.Map.Entry<Position,T>> positions(java.util.function.BiFunction<Position,T,Position> positionMapper)