target.apidocs.com.google.api.services.sheets.v4.model.ManualRule.html Maven / Gradle / Ivy
ManualRule (Google Sheets API v4-rev20240319-2.0.0)
com.google.api.services.sheets.v4.model
Class ManualRule
- 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.ManualRule
-
public final class ManualRule
extends com.google.api.client.json.GenericJson
Allows you to manually organize the values in a source data column into buckets with names of
your choosing. For example, a pivot table that aggregates population by state:
+-------+-------------------+ | State | SUM of Population | +-------+-------------------+ | AK |
0.7 | | AL | 4.8 | | AR | 2.9 | ... +-------+-------------------+ could be turned into a pivot
table that aggregates population by time zone by providing a list of groups (for example,
groupName = 'Central', items = ['AL', 'AR', 'IA', ...]) to a manual group rule. Note that a
similar effect could be achieved by adding a time zone column to the source data and adjusting
the pivot table. +-----------+-------------------+ | Time Zone | SUM of Population |
+-----------+-------------------+ | Central | 106.3 | | Eastern | 151.9 | | Mountain | 17.4 | ...
+-----------+-------------------+
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
ManualRule()
-
Method Summary
All Methods Instance Methods Concrete Methods
Modifier and Type
Method and Description
ManualRule
clone()
List<ManualRuleGroup>
getGroups()
The list of group names and the corresponding items from the source data that map to each group
name.
ManualRule
set(String fieldName,
Object value)
ManualRule
setGroups(List<ManualRuleGroup> groups)
The list of group names and the corresponding items from the source data that map to each group
name.
-
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
-
getGroups
public List<ManualRuleGroup> getGroups()
The list of group names and the corresponding items from the source data that map to each group
name.
- Returns:
- value or
null
for none
-
setGroups
public ManualRule setGroups(List<ManualRuleGroup> groups)
The list of group names and the corresponding items from the source data that map to each group
name.
- Parameters:
groups
- groups or null
for none
-
set
public ManualRule set(String fieldName,
Object value)
- Overrides:
set
in class com.google.api.client.json.GenericJson
-
clone
public ManualRule clone()
- Overrides:
clone
in class com.google.api.client.json.GenericJson
Copyright © 2011–2024 Google. All rights reserved.