Interface Mappable<X>

    • Method Detail

      • map

        @Contract(pure=true)
        <R> Mappable<R> map​(SerializableFunction<X,​R> mapper)
        Set an arbitrary `map` transformation function.
        Type Parameters:
        R - an arbitrary data type which is the return type of the transformation `map` function
        Parameters:
        mapper - function that will be applied to each data entry (osm entity snapshot or contribution)
        Returns:
        a modified copy of the current "Mappable" object operating on the transformed type (<R>)
      • flatMap

        @Contract(pure=true)
        <R> Mappable<R> flatMap​(SerializableFunction<X,​Iterable<R>> flatMapper)
        Set an arbitrary `flatMap` transformation function, which returns list with an arbitrary number of results per input data entry. The results of this function will be "flattened", meaning that they can be for example transformed again by setting additional `map` functions.
        Type Parameters:
        R - an arbitrary data type which is the return type of the transformation `map` function
        Parameters:
        flatMapper - function that will be applied to each data entry (osm entity snapshot or contribution) and returns a list of results
        Returns:
        a modified copy of the current "Mappable" object operating on the transformed type (<R>)
      • filter

        @Contract(pure=true)
        Mappable<X> filter​(SerializablePredicate<X> f)
        Adds a custom arbitrary filter that gets executed in the current transformation chain.
        Parameters:
        f - the filter function that determines if the respective data should be passed on (when f returns true) or discarded (when f returns false)
        Returns:
        a modified copy of this "Mappable" (can be used to chain multiple commands together)