Creates a pair object
@param first must be non-null
@param second must be non-null
@return The pair object.
422910
public static <F, S> Pair<F, S> of(F first, S second) {
        if (first == null || second == null) {
            throw new IllegalArgumentException("Pair.of requires non null values.");
        }
        return new Pair<F, S>(first, second);
    }
458565
static int nullCompare(Object first, Object second) {
        if (first == null) {
            if (second != null) {
                return 1;
            }
        } else if (second == null) {
            return -1;
        }
        return 0;
    }
734028
@Nullable
    public ByteIterable get2(@NotNull final Transaction txn, @NotNull final ByteIterable second) {
        return this.second.get(txn, second);
    }
654071
public double setCount(F first, S second, double value) {
        Counter<S> counter = maps.get(first);
        if (counter == null) {
            counter = new Counter<S>();
            maps.put(first, counter);
        }

        return counter.setCount(second, value);
    }
478294
@Deprecated
  public static <A,B> Parser<Pair<A,B>> pair(Parser<? extends A> p1, Parser<? extends B> p2) {
    return sequence(p1, p2, Pair::new);
  }
1339910
public static Pair<String,String> pair (final String s1, final String s2)
        {        
        if (StringUtils.isBlank(s1))
            {
            LOG.warn("Blank first arg");
            }
        if (StringUtils.isBlank(s2))
            {
            LOG.warn("Blank second arg for: "+s1);
            }
        return new PairImpl<String,String> (s1, s2);
        }
799852
public int union(int first, int second) {
    int firstComponent = find(first), secondComponent = find(second);
    if(firstComponent == secondComponent) {
      return firstComponent;
    }
    final int w1 = weight[firstComponent], w2 = weight[secondComponent];
    if(w1 > w2) {
      parent[secondComponent] = firstComponent;
      weight[firstComponent] += w2;
      return firstComponent;
    }
    else {
      parent[firstComponent] = secondComponent;
      weight[secondComponent] += w1;
      return secondComponent;
    }
  }
892897
public static <First, Second> Pair<First, Second> from(
      final First first, final Second second) {
    return new ImmutablePair<First, Second>(first, second);
  }
975307
public static <A, B> Choice2<A, B> b(B b) {
        return new _B<>(b);
    }
1065107
@JsonCreator
  public static JsonTwo create(
      @JsonProperty("two") String two,
      @JsonProperty("hello") String hello) {
    return builder()
        .setTwo(two)
        .setHello(hello)
        .build();
  }
469429
public static <CommonSuperType, First extends CommonSuperType, Second extends CommonSuperType>
      CommonSuperType[] toArray(final Pair<First, Second> pair,
          final Class<CommonSuperType> commonSuperType) {
    @SuppressWarnings("unchecked")
    final CommonSuperType[] array = (CommonSuperType[]) Array.newInstance(
        commonSuperType, 2);
    return toArray(pair, array, 0);
  }
38310
@SafeVarargs
    public static <T> List<T> buildListOfAtLeastTwo(T first, T second, T... more) {
        if (first == null) {
            throw new IllegalArgumentException("First example is null.");
        }
        if (second == null) {
            throw new IllegalArgumentException("Second example is null.");
        }

        List<T> result = new ArrayList<>();
        result.add(first);
        result.add(second);
        addArrayElementsToList(result, more);

        return result;
    }
420560
public static String[] intersect(
      Comparator<? super String> comparator, String[] first, String[] second) {
    List<String> result = new ArrayList<>();
    for (String a : first) {
      for (String b : second) {
        if (comparator.compare(a, b) == 0) {
          result.add(a);
          break;
        }
      }
    }
    return result.toArray(new String[0]);
  }
580133
public void addChildren( AstNode first,
                             AstNode second ) {
        if (first != null) {
            this.addLastChild(first);
        }
        if (second != null) {
            this.addLastChild(second);
        }
    }
693406
public static ListValue of(String first, String... other) {
    return newBuilder().addValue(first, other).build();
  }
1034448
public EntityMakerBuilder reuseEntities(Object first, Object second, Object... rest) {
        List<Object> objects = ImmutableList.builder().add(first).add(second).add(rest).build();
        return reuseEntities(objects);
    }
747035
public int compare(final T first, final T second) {
    if (first.equals(second)) return 0;
    else return first.size() - second.size();
  }