Interface Projection<I,​O>

  • Type Parameters:
    I - input type
    O - output type
    All Superinterfaces:
    java.io.Serializable
    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 Projection<I,​O>
    extends java.io.Serializable
    Enables transforming object into other objects. Exemplary usage scenario is the project() method of the IMap

    Only 1:1 transformations allowed. Use an Aggregator to perform N:1 or N:M aggregations.

          IMap<String, Employee> employees = instance.getMap("employees");
    
          Collection<String> names = employees.project(new Projection<Map.Entry<String,Employee>,String>(){
              @Override
              public String transform(Map.Entry<String, Employee> entry){
                  return entry.getValue().getName();
              }
          });
     
    Since:
    3.8
    • Method Detail

      • transform

        O transform​(I input)
        Transforms the input object into the output object.
        Parameters:
        input - object.
        Returns:
        the output object.