Interface TupleValueFunction<ComponentType,ValueType>


public interface TupleValueFunction<ComponentType,ValueType>
Map a tuple-like object to a value
Author:
Claus Stadler 11/09/2020
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T, C> C
    component0(T tupleLike, TupleAccessor<? super T,? extends C> tupleAccessor)
    TupleValueFunction-compatible method that returns the component at index 0
    <TupleLike>
    ValueType
    map(TupleLike tupleLike, TupleAccessor<? super TupleLike,? extends ComponentType> tupleAccessor)
     
    static <ComponentType, ValueType>
    TupleValueFunction<ComponentType,ValueType>
    newComponent(int idx)
     
    static <ComponentType, ValueType>
    TupleValueFunction<ComponentType,ValueType>
    TupleValueFunction that returns the tuple itself as the value
  • Method Details

    • map

      <TupleLike> ValueType map(TupleLike tupleLike, TupleAccessor<? super TupleLike,? extends ComponentType> tupleAccessor)
    • newIdentity

      static <ComponentType, ValueType> TupleValueFunction<ComponentType,ValueType> newIdentity()
      TupleValueFunction that returns the tuple itself as the value
      Type Parameters:
      T -
      C -
      Parameters:
      tupleLike -
      tupleAccessor -
      Returns:
    • newComponent

      static <ComponentType, ValueType> TupleValueFunction<ComponentType,ValueType> newComponent(int idx)
    • component0

      static <T, C> C component0(T tupleLike, TupleAccessor<? super T,? extends C> tupleAccessor)
      TupleValueFunction-compatible method that returns the component at index 0
      Type Parameters:
      T -
      C -
      Parameters:
      tupleLike -
      tupleAccessor -
      Returns: