am 5f1c59bb: am 64ee0961: Add toString method to InputPointers and ResizableIntArray

* commit '5f1c59bb2fb574bbfe717f2683accdc59c249c00':
  Add toString method to InputPointers and ResizableIntArray
main
Tadashi G. Takaoka 2012-08-23 01:39:53 -07:00 committed by Android Git Automerger
commit c32f770798
2 changed files with 18 additions and 0 deletions

View File

@ -124,4 +124,10 @@ public class InputPointers {
public int[] getTimes() {
return mTimes.getPrimitiveArray();
}
@Override
public String toString() {
return "size=" + getPointerSize() + " id=" + mPointerIds + " time=" + mTimes
+ " x=" + mXCoordinates + " y=" + mYCoordinates;
}
}

View File

@ -131,4 +131,16 @@ public class ResizableIntArray {
mLength = endPos;
}
}
@Override
public String toString() {
final StringBuilder sb = new StringBuilder();
for (int i = 0; i < mLength; i++) {
if (i != 0) {
sb.append(",");
}
sb.append(mArray[i]);
}
return "[" + sb + "]";
}
}