Keeping task list stable across multiple task switches
Change-Id: I3b334a8c8fb13ad54bc19e782cae016fe3c78ff6
This commit is contained in:
1 parent
2f979d2639
commit
849d7e6c41
6 files changed
+148
-2
No files matched your search
@@ -49,10 +49,29 @@ public class IntSet {
|
||||
return mArray.size();
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
mArray.clear();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (obj == this) {
|
||||
return true;
|
||||
}
|
||||
return (obj instanceof IntSet) && ((IntSet) obj).mArray.equals(mArray);
|
||||
}
|
||||
|
||||
public IntArray getArray() {
|
||||
return mArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets this set to be same as {@param other}
|
||||
*/
|
||||
public void copyFrom(IntSet other) {
|
||||
mArray.copyFrom(other.mArray);
|
||||
}
|
||||
|
||||
public static IntSet wrap(IntArray array) {
|
||||
IntSet set = new IntSet();
|
||||
set.mArray.addAll(array);
|
||||
|
||||
Reference in new issue
Block a user