TernaryFunction javadoc added