import java.util.Optional; 
import java.util.function.Function; 

import javafx.beans.property.SimpleObjectProperty; 
import javafx.beans.value.ObservableValue; 
import javafx.collections.ObservableList; 

public class Foo<T> { 
public Foo( 
ObservableList<? extends T> pArg1, 
ObservableValue<? extends Function<? super T,ObservableValue<?>>> pArg2 
) { 
this( 
pArg1, 
pVal -> new Bar<>( 
map( 
pArg2, 
pFunction -> Optional.ofNullable(pFunction).map( 
pFunc -> pFunc.apply(pVal) 
).orElse(new SimpleObjectProperty()) 
) 
) 
); 
} 

public Foo( 
ObservableList<? extends T> pArg1, 
Function<? super T,? extends ObservableValue<?>> pArg2 
) { 
} 

    public static <T, U> ObservableValue<U> map(ObservableValue<T> pArg1, Function<T, U> pArg2) { 
        return new SimpleObjectProperty<>(); 
    } 
} 