public static <First, Second> MutablePair<First, Second> ofNonNull(final First first, final Second second)
            throws NullPointerException {
        if (first == null || second == null) {
            throw new NullPointerException("Tried to construct non-nullable pair with null value.");
        }
        return new MutablePair<First, Second>(first, second);
    }
public static < First , Second > MutablePair < First , Second > ofNonNull ( final First first , final Second second ) throws NullPointerException { if ( first == null || second == null ) { throw new NullPointerException ( "Tried to construct non-nullable pair with null value." ) ; } return new MutablePair < First , Second > ( first , second ) ; }
@param first cannot be null.
@param second cannot be null.
@return a new pair with the passed variables.
@throws NullPointerException if any of the variables are null.
@param <First> type of first value.
@param <Second> type of second value.