List of usage examples for android.support.v4.util ArraySet add
@Override public boolean add(E value)
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/*from w w w.j a va2s . co 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; }