target.apidocs.com.google.api.services.sheets.v4.model.GridRange.html Maven / Gradle / Ivy
GridRange (Google Sheets API v4-rev20230526-2.0.0)
com.google.api.services.sheets.v4.model
Class GridRange
- java.lang.Object
-
- java.util.AbstractMap<String,Object>
-
- com.google.api.client.util.GenericData
-
- com.google.api.client.json.GenericJson
-
- com.google.api.services.sheets.v4.model.GridRange
-
public final class GridRange
extends com.google.api.client.json.GenericJson
A range on a sheet. All indexes are zero-based. Indexes are half open, i.e. the start index is
inclusive and the end index is exclusive -- [start_index, end_index). Missing indexes indicate
the range is unbounded on that side. For example, if `"Sheet1"` is sheet ID 123456, then:
`Sheet1!A1:A1 == sheet_id: 123456, start_row_index: 0, end_row_index: 1, start_column_index: 0,
end_column_index: 1` `Sheet1!A3:B4 == sheet_id: 123456, start_row_index: 2, end_row_index: 4,
start_column_index: 0, end_column_index: 2` `Sheet1!A:B == sheet_id: 123456, start_column_index:
0, end_column_index: 2` `Sheet1!A5:B == sheet_id: 123456, start_row_index: 4, start_column_index:
0, end_column_index: 2` `Sheet1 == sheet_id: 123456` The start index must always be less than or
equal to the end index. If the start index equals the end index, then the range is empty. Empty
ranges are typically not meaningful and are usually rendered in the UI as `#REF!`.
This is the Java data model class that specifies how to parse/serialize into the JSON that is
transmitted over HTTP when working with the Google Sheets API. For a detailed explanation see:
https://developers.google.com/api-client-library/java/google-http-java-client/json
- Author:
- Google, Inc.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.api.client.util.GenericData
com.google.api.client.util.GenericData.Flags
-
Nested classes/interfaces inherited from class java.util.AbstractMap
AbstractMap.SimpleEntry<K,V>, AbstractMap.SimpleImmutableEntry<K,V>
-
Constructor Summary
Constructors
Constructor and Description
GridRange()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
GridRange
clone()
Integer
getEndColumnIndex()
The end column (exclusive) of the range, or not set if unbounded.
Integer
getEndRowIndex()
The end row (exclusive) of the range, or not set if unbounded.
Integer
getSheetId()
The sheet this range is on.
Integer
getStartColumnIndex()
The start column (inclusive) of the range, or not set if unbounded.
Integer
getStartRowIndex()
The start row (inclusive) of the range, or not set if unbounded.
GridRange
set(String fieldName,
Object value)
GridRange
setEndColumnIndex(Integer endColumnIndex)
The end column (exclusive) of the range, or not set if unbounded.
GridRange
setEndRowIndex(Integer endRowIndex)
The end row (exclusive) of the range, or not set if unbounded.
GridRange
setSheetId(Integer sheetId)
The sheet this range is on.
GridRange
setStartColumnIndex(Integer startColumnIndex)
The start column (inclusive) of the range, or not set if unbounded.
GridRange
setStartRowIndex(Integer startRowIndex)
The start row (inclusive) of the range, or not set if unbounded.
-
Methods inherited from class com.google.api.client.json.GenericJson
getFactory, setFactory, toPrettyString, toString
-
Methods inherited from class com.google.api.client.util.GenericData
entrySet, equals, get, getClassInfo, getUnknownKeys, hashCode, put, putAll, remove, setUnknownKeys
-
Methods inherited from class java.util.AbstractMap
clear, containsKey, containsValue, isEmpty, keySet, size, values
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Map
compute, computeIfAbsent, computeIfPresent, forEach, getOrDefault, merge, putIfAbsent, remove, replace, replace, replaceAll
-
-
Method Detail
-
getEndColumnIndex
public Integer getEndColumnIndex()
The end column (exclusive) of the range, or not set if unbounded.
- Returns:
- value or
null
for none
-
setEndColumnIndex
public GridRange setEndColumnIndex(Integer endColumnIndex)
The end column (exclusive) of the range, or not set if unbounded.
- Parameters:
endColumnIndex
- endColumnIndex or null
for none
-
getEndRowIndex
public Integer getEndRowIndex()
The end row (exclusive) of the range, or not set if unbounded.
- Returns:
- value or
null
for none
-
setEndRowIndex
public GridRange setEndRowIndex(Integer endRowIndex)
The end row (exclusive) of the range, or not set if unbounded.
- Parameters:
endRowIndex
- endRowIndex or null
for none
-
getSheetId
public Integer getSheetId()
The sheet this range is on.
- Returns:
- value or
null
for none
-
setSheetId
public GridRange setSheetId(Integer sheetId)
The sheet this range is on.
- Parameters:
sheetId
- sheetId or null
for none
-
getStartColumnIndex
public Integer getStartColumnIndex()
The start column (inclusive) of the range, or not set if unbounded.
- Returns:
- value or
null
for none
-
setStartColumnIndex
public GridRange setStartColumnIndex(Integer startColumnIndex)
The start column (inclusive) of the range, or not set if unbounded.
- Parameters:
startColumnIndex
- startColumnIndex or null
for none
-
getStartRowIndex
public Integer getStartRowIndex()
The start row (inclusive) of the range, or not set if unbounded.
- Returns:
- value or
null
for none
-
setStartRowIndex
public GridRange setStartRowIndex(Integer startRowIndex)
The start row (inclusive) of the range, or not set if unbounded.
- Parameters:
startRowIndex
- startRowIndex or null
for none
-
set
public GridRange set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public GridRange clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2023 Google. All rights reserved.