Skip to content

Commit 1674c9c

Browse files
committed
Document ClassCastException in FieldValue
1 parent 27f4d0d commit 1674c9c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery

gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/FieldValue.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ public String stringValue() {
106106
* Returns this field's value as a {@link Long}. This method should only be used if the
107107
* corresponding field has {@link Field.Type#integer()} type.
108108
*
109+
* @throws ClassCastException if the field has not primitive type
109110
* @throws NumberFormatException if the field's value could not be converted to {@link Integer}
110111
*/
111112
@SuppressWarnings("unchecked")
@@ -117,6 +118,7 @@ public long longValue() {
117118
* Returns this field's value as a {@link Double}. This method should only be used if the
118119
* corresponding field has {@link Field.Type#floatingPoint()} type.
119120
*
121+
* @throws ClassCastException if the field has not primitive type
120122
* @throws NumberFormatException if the field's value could not be converted to {@link Double}
121123
*/
122124
@SuppressWarnings("unchecked")
@@ -128,6 +130,7 @@ public double doubleValue() {
128130
* Returns this field's value as a {@link Boolean}. This method should only be used if the
129131
* corresponding field has {@link Field.Type#bool()} type.
130132
*
133+
* @throws ClassCastException if the field has not primitive type
131134
* @throws IllegalStateException if the field's value could not be converted to {@link Boolean}
132135
*/
133136
@SuppressWarnings("unchecked")
@@ -142,6 +145,7 @@ public boolean booleanValue() {
142145
* Returns this field's value as a {@link Long}, representing a timestamp in microseconds. This
143146
* method should only be used if the corresponding field has {@link Field.Type#timestamp()} type.
144147
*
148+
* @throws ClassCastException if the field has not primitive type
145149
* @throws NumberFormatException if the field's value could not be converted to {@link Long}
146150
*/
147151
@SuppressWarnings("unchecked")

0 commit comments

Comments
 (0)