Enum MatchType
Stay organized with collections
Save and categorize content based on your preferences.
MatchType
An enumeration of how a string value should be matched. Matching a string is a boolean operation.
Given a string, a match term (string), and a match type, the operation outputs true
in
the following cases:
- If the match type equals EXACT and the match term equals the string.
- If the match type equals PREFIX and the match term is a prefix of the string.
- If the match type equals ANY and the match term is a substring of the string.
This enumeration can be used in by a string filter control to decide which rows to filter out
of the data table. Given a column to filter on, leave only the rows that match the value entered
in the filter input box, using one of the above matching types.
To call an enum, you call its parent class, name, and property. For example,
Charts.MatchType.EXACT
.
Properties
Property | Type | Description |
EXACT | Enum | Match exact values only |
PREFIX | Enum | Match prefixes starting from the beginning of the value |
ANY | Enum | Match any substring |
Methods
Method | Return type | Brief description |
getName() | String | Returns the name of the match type to be used in the options JSON. |
Detailed documentation
getName()
Returns the name of the match type to be used in the options JSON.
Return
String
— The name of the type.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-12-02 UTC.
[null,null,["Last updated 2024-12-02 UTC."],[[["\u003cp\u003e\u003ccode\u003eMatchType\u003c/code\u003e is an enumeration used to define how a string value should be matched against a given search term.\u003c/p\u003e\n"],["\u003cp\u003eIt provides three options: \u003ccode\u003eEXACT\u003c/code\u003e, \u003ccode\u003ePREFIX\u003c/code\u003e, and \u003ccode\u003eANY\u003c/code\u003e for matching exact values, prefixes, and substrings respectively.\u003c/p\u003e\n"],["\u003cp\u003eThis enumeration can be utilized by string filter controls to filter data table rows based on user input and the selected match type.\u003c/p\u003e\n"],["\u003cp\u003eCalling a \u003ccode\u003eMatchType\u003c/code\u003e property is done using the parent class, name, and desired property, for instance, \u003ccode\u003eCharts.MatchType.EXACT\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetName()\u003c/code\u003e method is available to retrieve the name of the match type for use in JSON options.\u003c/p\u003e\n"]]],["MatchType defines string matching criteria. `EXACT` requires an exact string match. `PREFIX` checks if the match term is at the beginning of the string. `ANY` verifies if the match term is a substring. This determines if a row should be kept when filtering a data table. `getName()` returns the match type's name. The enum can be called using `Charts.MatchType.[property]` (e.g., `Charts.MatchType.EXACT`).\n"],null,["# Enum MatchType\n\nMatchType\n\nAn enumeration of how a string value should be matched. Matching a string is a boolean operation.\nGiven a string, a match term (string), and a match type, the operation outputs `true` in\nthe following cases:\n\n1. If the match type equals EXACT and the match term equals the string.\n2. If the match type equals PREFIX and the match term is a prefix of the string.\n3. If the match type equals ANY and the match term is a substring of the string.\n\nThis enumeration can be used in by a string filter control to decide which rows to filter out\nof the data table. Given a column to filter on, leave only the rows that match the value entered\nin the filter input box, using one of the above matching types.\n\nTo call an enum, you call its parent class, name, and property. For example, `\nCharts.MatchType.EXACT`. \n\n### Properties\n\n| Property | Type | Description |\n|----------|--------|---------------------------------------------------------|\n| `EXACT` | `Enum` | Match exact values only |\n| `PREFIX` | `Enum` | Match prefixes starting from the beginning of the value |\n| `ANY` | `Enum` | Match any substring |\n\n### Methods\n\n| Method | Return type | Brief description |\n|-------------------------|-------------|--------------------------------------------------------------------|\n| [getName()](#getName()) | `String` | Returns the name of the match type to be used in the options JSON. |\n\nDetailed documentation\n----------------------\n\n### `get``Name()`\n\nReturns the name of the match type to be used in the options JSON.\n\n#### Return\n\n\n`String` --- The name of the type."]]