References implements Parcelable, Iterable<Reference<T>> { public static <S extends Propoid> References<S> from(List<S> propoids) { Class<? extends Propoid> type = null; long[] ids = new long[propoids.size()]; for (int i = 0; i < ids.length; i++) { S propoid = propoids.get(i); ids[i] = Row.getID(propoid); if (ids[i] == Row.TRANSIENT) { throw new IllegalArgumentException("cannot reference transient propoid"); } type = propoid.getClass(); } if (type == null) { return new References(); } else { return new References<S>((Class<? extends S>) type, ids); } } References();  References(Class<? extends T> type, long[] ids); int size(); @Override boolean equals(Object o); @Override int hashCode(); @Override Iterator<Reference<T>> iterator(); @Override int describeContents(); @SuppressWarnings("unchecked") @Override void writeToParcel(Parcel parcel, int flags); static References<S> from(List<S> propoids); @SuppressWarnings("rawtypes")
	static final Parcelable.Creator<References> CREATOR; }
@Test public void testFrom() { List<Foo> foos = new ArrayList<>(); foos.add(new Foo()); try { References.from(foos); fail(); } catch(IllegalArgumentException expected) { } Row.setID(foos.get(0), 1l); References<Foo> references = References.from(foos); assertEquals(1, references.size()); Reference<Foo> foo = references.iterator().next(); }