docs: Clarified behavior of TypedArray.getBoolean()

Doc currently says "The method will return whether [the attribute] is equal to zero", which could be read as "returns true if the attribute is zero", which is incorrect. Rephrased as: "...returns false if the attribute is equal to zero, and true otherwise."

Change-Id: Ie7d763ac2784ecc3a7fb522b4fa583ec8d2644d4
BUG: 143049875
Test: make ds-docs
This commit is contained in:
Andrew Solovay
2019-11-01 22:19:04 +00:00
parent 7186df9e6f
commit ee07a8cadb

View File

@@ -360,8 +360,9 @@ public class TypedArray {
/**
* Retrieve the boolean value for the attribute at <var>index</var>.
* <p>
* If the attribute is an integer value, this method will return whether
* it is equal to zero. If the attribute is not a boolean or integer value,
* If the attribute is an integer value, this method returns false if the
* attribute is equal to zero, and true otherwise.
* If the attribute is not a boolean or integer value,
* this method will attempt to coerce it to an integer using
* {@link Integer#decode(String)} and return whether it is equal to zero.
*