class Utilities {

    public static <T> T getNonNull(T o1, T o2, BinaryOperator<T> resolver)
    {
        T result = null;
        if (o1 != null && o2 != null)
        {
            result = resolver.apply(o1, o2);
        }
        else if (o1 != null)
        {
            result = o1;
        }
        else
        {
            result = o2;
        }
        return result;
    }

    private  Utilities();

}