Gets a source from the given items.

@param items the items.
@param <T> the type.
@return the source.
189182
public static <T> Source<T> from(T... items) {
        return from(Arrays.asList(items));
    }
283375
public void setItems(java.util.Collection<java.util.Map<String,AttributeValue>> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        java.util.List<java.util.Map<String,AttributeValue>> itemsCopy = new java.util.ArrayList<java.util.Map<String,AttributeValue>>(items.size());
        itemsCopy.addAll(items);
        this.items = itemsCopy;
    }
144211
public void setItems(java.util.Collection<VpcLink> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<VpcLink>(items);
    }
903735
public <T> List<T> getItems(Class<T> type) {
        List<T> r = new ArrayList<>();
        for (TopLevelItem i : getItems())
            if (type.isInstance(i))
                 r.add(type.cast(i));
        return r;
    }
426875
public void setItems(java.util.Collection<Integration> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Integration>(items);
    }
907827
public long get(T item) {
        MutableLong count = map.get(item);
        return count == null ? 0 : count.value;
    }
341088
private Data[] convertToData(T[] items) {
        if (items == null || items.length == 0) {
            return new Data[0];
        }
        if (items[0] instanceof Data) {
            return (Data[]) items;
        }
        final Data[] ret = new Data[items.length];
        for (int i = 0; i < items.length; i++) {
            ret[i] = convertToData(items[i]);
        }
        return ret;
    }
124290
public CreateCollectionRequestBuilder<T,ID> create(List<T> items)
    {
        return new CreateCollectionRequestBuilder<T,ID>(version,type,entityName,items);
    }
744077
public ModelAdapter<Model, Item> set(List<Model> items) {
        return set(items, true);
    }
1218023
def source(self, source):
        """"""
        if isinstance(source, list):
            # if source is a list, get first item or None
            source = source[0] if len(source) > 0 else None
        self._source = source
1144163
public void setItems(java.util.Collection<Resource> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<Resource>(items);
    }
1183376
public void setItems(java.util.Collection<DocumentationVersion> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<DocumentationVersion>(items);
    }
675230
public UpdateCollectionRequestBuilder<T,ID> update(List<T> items)
    {
        return new UpdateCollectionRequestBuilder<T, ID>(version,type,entityName,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);
    }
135785
public void setItems(java.util.Collection<BasePathMapping> items) {
        if (items == null) {
            this.items = null;
            return;
        }

        this.items = new java.util.ArrayList<BasePathMapping>(items);
    }
396278
public static <T> ImmutableList<T> asUniquedList(Iterable<T> items) {
    return ImmutableSet.copyOf(items).asList();
  }
544669
public T get(String name) {
        if (m_items == null) {
            return null;
        }
        return m_items.get(name.toUpperCase());
    }