List of usage examples for android.support.v4.util ArraySet addAll
@Override public boolean addAll(Collection<? extends E> collection)
From source file:cc.metapro.openct.data.university.model.classinfo.EnrichedClassInfo.java
/** * merge class with same name to one, the differences should be in time, place, teacher, during * and time is the key of them/* w ww.j a v a2 s . c o m*/ * * @param info another class info which has the same name with this one */ void combine(EnrichedClassInfo info) { if (info == null) return; ArraySet<ClassTime> mixedTime = new ArraySet<>(); mixedTime.addAll(mTimeSet); for (ClassTime time : info.getTimeSet()) { boolean found = false; for (ClassTime myTime : mTimeSet) { if (myTime.equals(time)) { found = true; myTime.combineDuring(time.getDuring()); mixedTime.add(myTime); } } if (!found) { mixedTime.add(time); } } mTimeSet = mixedTime; }