Static factory method for wrapping a value of type <code>B</code> in a {@link Choice2}.

@param b   the value
@param <A> the first possible type
@param <B> the second possible type
@return the wrapped value as a {@link Choice2}&lt;A, B&gt;
975307
public static <A, B> Choice2<A, B> b(B b) {
        return new _B<>(b);
    }
577882
@Inline(value="$1.add($2)")
	@Pure
	public static BigInteger operator_plus(BigInteger a, BigInteger b) {
		return a.add(b);
	}
1194109
public E union(E e1, E e2) {
	Node<E> node1 = _get_or_create_root_set(e1);
	Node<E> node2 = _get_or_create_root_set(e2);
	return _link(node1, node2).element;
    }
8721
public IVector sub(IVector b) {
        IVector result = new IVector(size);
        sub(b, result);
        return result;
    }
62017
private MultiValueMap<String, String> union(MultiValueMap<String, String> map1, MultiValueMap<String, String> map2) {
		MultiValueMap<String, String> union = new LinkedMultiValueMap<String, String>(map1);
		Set<Entry<String, List<String>>> map2Entries = map2.entrySet();
		for (Iterator<Entry<String, List<String>>> entryIt = map2Entries.iterator(); entryIt.hasNext();) {
			Entry<String, List<String>> entry = entryIt.next();
			String key = entry.getKey();
			List<String> values = entry.getValue();
			for (String value : values) {
				union.add(key, value);
			}
		}
		return union;
	}
1190536
public Choice<T> or(final Choice<T> other) {
    checkNotNull(other);
    if (other == none()) {
      return this;
    } else {
      final Choice<T> thisChoice = this;
      return new Choice<T>() {
        @Override
        protected Iterator<T> iterator() {
          return Iterators.concat(thisChoice.iterator(), other.iterator());
        }

        @Override
        public String toString() {
          return String.format("%s.or(%s)", thisChoice, other);
        }
      };
    }
  }
1120015
public <B, C> DecomposableMatchBuilder2<T, B, C> decomposeFirst(
      DecomposableMatchBuilder2<A, B, C> first) {
    Objects.requireNonNull(first);

    Map<Integer, DecomposableMatchBuilder> buildersByIndex = Maps.treeMapOf(extractedIndex, first);

    List<Matcher<Object>> matchers = getChildMatchers(buildersByIndex);

    Tuple2<Integer, Integer> newIndexes = Tuple2.of(
        extractedIndex + first.extractedIndexes.first(),
        extractedIndex + first.extractedIndexes.second());

    NestedFieldExtractor<T> nestedFieldExtractor = getNestedFieldExtractor(buildersByIndex);

    return new DecomposableMatchBuilder2<>(matchers, newIndexes, nestedFieldExtractor);
  }
1364881
public final <T1, T2> Tuple2<T1, T2> concat(Tuple2<T1, T2> tuple) {
        return new Tuple2<>(tuple.v1, tuple.v2);
    }
911261
public static Pair<Object, Object> toSame(Object value1, Object value2, EvaluationContext ctx) {
        if (value1.getClass().equals(value2.getClass())) {
            return new ImmutablePair<>(value1, value2);
        }

        try {
            // try converting to two decimals
            return new ImmutablePair<Object, Object>(toDecimal(value1, ctx), toDecimal(value2, ctx));
        }
        catch (EvaluationError ex) {}

        try {
            // try converting to two dates
            Temporal d1 = toDateOrDateTime(value1, ctx);
            Temporal d2 = toDateOrDateTime(value2, ctx);
            if (!value1.getClass().equals(value2.getClass())) {
                d1 = toDateTime(d1, ctx);
                d2 = toDateTime(d2, ctx);
            }

            return new ImmutablePair<Object, Object>(d1, d2);
        }
        catch (EvaluationError ex) {}

        // try converting to two strings
        return new ImmutablePair<Object, Object>(toString(value1, ctx), toString(value2, ctx));
    }
1063763
public AttributeValue withBS(java.nio.ByteBuffer... bS) {
        if (getBS() == null) setBS(new java.util.ArrayList<java.nio.ByteBuffer>(bS.length));
        for (java.nio.ByteBuffer value : bS) {
            getBS().add(value);
        }
        return this;
    }
892897
public static <First, Second> Pair<First, Second> from(
      final First first, final Second second) {
    return new ImmutablePair<First, Second>(first, second);
  }
143384
public IVector add(IVector b) {
        IVector result = new IVector(size);
        add(b, result);
        return result;
    }
587872
public static Value.Builder makeValue(Value.Builder value1, Value.Builder value2,
      Value.Builder... rest) {
    ArrayValue.Builder arrayValue = ArrayValue.newBuilder();
    arrayValue.addValues(value1);
    arrayValue.addValues(value2);
    for (Value.Builder builder : rest) {
      arrayValue.addValues(builder);
    }
    return Value.newBuilder().setArrayValue(arrayValue);
  }
609574
public <U extends T, A, B> InitialMatching2<T, U, A, B> when(
      DecomposableMatchBuilder2<U, A, B> decomposableMatchBuilder) {
    return new InitialMatching2<>(decomposableMatchBuilder.build(), value);
  }
1196196
public  <R1> Unrestricted<R1> forEach2(Function<? super T, Unrestricted<R1>> value2) {


        return this.flatMap(in -> {

            Unrestricted<R1> a = value2.apply(in);
            return a;
        });



    }
1027444
public static byte[] concat(Bytes b1, Bytes b2) {
    int offset = 0;
    int size = b1.length() + checkVlen(b1.length()) + b2.length() + checkVlen(b2.length());

    byte[] data = new byte[size];

    offset = writeVint(data, offset, b1.length());
    b1.copyTo(data, offset);
    offset += b1.length();

    offset = writeVint(data, offset, b2.length());
    b2.copyTo(data, offset);

    return data;
  }
176004
public final <T2> Tuple2<T1, T2> concat(T2 value) {
        return new Tuple2<>(v1, value);
    }