Of n tuple.

@param <T>   the type parameter
@param items the items
@return the n tuple
961849
public static <T> NTuple of(@NonNull List<T> items) {
    return new NTuple(items.toArray());
  }
191059
public static <K, V> Map<K, V> ofMap(Object... items) {
        HashMap<K, V> map = new LinkedHashMap<>(Math.max(1, items.length / 2));
        int len = items.length / 2;
        for (int i = 0; i < len; i++) {
            map.put((K) items[i * 2], (V) items[i * 2 + 1]);
        }
        return map;
    }
296554
static <T> Iterable<T> annotateEmptyStrings(Iterable<T> items) {
    if (Iterables.contains(items, "")) {
      List<T> annotatedItems = Lists.newArrayList();
      for (T item : items) {
        if (Objects.equal(item, "")) {
          // This is a safe cast because know that at least one instance of T (this item) is a
          // String.
          @SuppressWarnings("unchecked")
          T newItem = (T) HUMAN_UNDERSTANDABLE_EMPTY_STRING;
          annotatedItems.add(newItem);
        } else {
          annotatedItems.add(item);
        }
      }
      return annotatedItems;
    } else {
      return items;
    }
  }
127681
public boolean addAll(Collection<T> items)
	{
		boolean wasAllAdded = true;
		for (T item : items)
		{
			if(!add(item))
				wasAllAdded = false;
		}
		
		return wasAllAdded;
	}
1176073
private List<Tuple> tuplesResult(EntityKey[] keys, TupleContext tupleContext, ResourceIterator<Node> nodes) {
		// The list is initialized with null because some keys might not have a corresponding node
		Tuple[] tuples = new Tuple[keys.length];
		while ( nodes.hasNext() ) {
			Node node = nodes.next();
			for ( int i = 0; i < keys.length; i++ ) {
				if ( matches( node, keys[i].getColumnNames(), keys[i].getColumnValues() ) ) {
					tuples[i] = new Tuple( EmbeddedNeo4jTupleSnapshot.fromNode( node,
							tupleContext.getTupleTypeContext().getAllAssociatedEntityKeyMetadata(),
							tupleContext.getTupleTypeContext().getAllRoles(),
							keys[i].getMetadata() ), SnapshotType.UPDATE );
					// We assume there are no duplicated keys
					break;
				}
			}
		}
		return Arrays.asList( tuples );
	}
504231
public static <T> ImmutableMap<T, Integer> indexMap(Iterable<? extends T> items) {
    final ImmutableMap.Builder<T, Integer> ret = ImmutableMap.builder();
    int idx = 0;
    for (final T item : items) {
      ret.put(item, idx++);
    }
    return ret.build();
  }
1109600
public static <T> Set<Set<T>> combinations(Set<T> elements, int subsetSize) {
        return combinationsStream(elements, subsetSize).collect(Collectors.toSet());
    }
256160
public static List<Item> toItemList(List<Map<String, AttributeValue>> items) {
        if (items == null) {
            return Collections.emptyList();
        }
        List<Item> result = new ArrayList<Item>(items.size());
        for (Map<String, AttributeValue> item : items) {
            result.add(toItem(item));
        }
        return result;
    }
251228
@SafeVarargs
  public static <T> Stream<T> of(T... items) {
    checkNotNull(items);
    return new StreamImpl<T>(Arrays.asList(items));
  }
466935
public static int getFlattenedItemsCount(final Object... items) {

        return stream(items)
            .map(item -> item.getClass().isArray() ? getFlattenedItemsCount((Object[]) item) : 1)
            .reduce(0, Integer::sum);
    }
199307
public boolean addAll(CharacterArray items) {
    ensureCapacity(size + items.size);
    for (int i = 0; i < items.size; i++) {
      elements[size++] = items.elements[i];
    }
    return items.size > 0;
  }
961715
public static <T> List<T> sorted(Iterable<T> items, Comparator<T> comparator) {
    List<T> result = toList(items);
    Collections.sort(result, comparator);
    return result;
  }
388869
public boolean removeItems(Collection<? extends T> items) {
        if (mListItems.removeAll(items)) {
            notifyDataSetChanged();
            return true;
        }
        return false;
    }
652408
public ListBuilder<T> addAll(int index, Collection<? extends T> items) {
        list.addAll(index, items);
        return this;
    }
189182
public static <T> Source<T> from(T... items) {
        return from(Arrays.asList(items));
    }
429333
public void setItems(java.util.Collection<ApiMapping> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<ApiMapping>(items);
    }
1059266
public static <T> Set<T> toSet(Iterable<T> items) {
    Set<T> set = new HashSet<T>();
    addAll(set, items);
    return set;
  }