Stay organized with collections
Save and categorize content based on your preferences.
public final class
Condition
extends Object
Represents a Remote Config condition that can be included in a Template.
A condition targets a specific group of users. A list of these conditions make up
part of a Remote Config template.
A non-null, non-empty, and unique name of this condition.
expression
A non-null and non-empty expression of this condition.
tagColor
A color associated with this condition for display purposes in the
Firebase Console. Not specifying this value results in the console picking an
arbitrary color to associate with the condition.
The color associated with this condition for display purposes in the Firebase Console.
Not specifying this value results in the console picking an arbitrary color to associate
with the condition.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2021-04-28 UTC."],[],[],null,["# Condition\n\npublic final class **Condition** extends Object \nRepresents a Remote Config condition that can be included in a [Template](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Template).\nA condition targets a specific group of users. A list of these conditions make up\npart of a Remote Config template. \n\n### Public Constructor Summary\n\n|---|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| | [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#Condition(java.lang.String, java.lang.String))(String name, String expression) Creates a new [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). |\n| | [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#Condition(java.lang.String, java.lang.String, com.google.firebase.remoteconfig.TagColor))(String name, String expression, [TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor) tagColor) Creates a new [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). |\n\n### Public Method Summary\n\n|----------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| boolean | [equals](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#equals(java.lang.Object))(Object o) |\n| String | [getExpression](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#getExpression())() Gets the expression of the condition. |\n| String | [getName](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#getName())() Gets the name of the condition. |\n| [TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor) | [getTagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#getTagColor())() Gets the tag color of the condition used for display purposes in the Firebase Console. |\n| int | [hashCode](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#hashCode())() |\n| [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition) | [setExpression](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#setExpression(java.lang.String))(String expression) Sets the expression of the condition. |\n| [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition) | [setName](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#setName(java.lang.String))(String name) Sets the name of the condition. |\n| [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition) | [setTagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition#setTagColor(com.google.firebase.remoteconfig.TagColor))([TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor) tagColor) Sets the tag color of the condition. |\n\n### Inherited Method Summary\n\nFrom class java.lang.Object \n\n|------------------|---------------------------|\n| Object | clone() |\n| boolean | equals(Object arg0) |\n| void | finalize() |\n| final Class\\\u003c?\\\u003e | getClass() |\n| int | hashCode() |\n| final void | notify() |\n| final void | notifyAll() |\n| String | toString() |\n| final void | wait(long arg0, int arg1) |\n| final void | wait(long arg0) |\n| final void | wait() |\n\nPublic Constructors\n-------------------\n\n#### public\n**Condition**\n(String name, String expression)\n\nCreates a new [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). \n\n##### Parameters\n\n| name | A non-null, non-empty, and unique name of this condition. |\n| expression | A non-null and non-empty expression of this condition. |\n|------------|-----------------------------------------------------------|\n\n#### public\n**Condition**\n(String name, String expression, [TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor) tagColor)\n\nCreates a new [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). \n\n##### Parameters\n\n| name | A non-null, non-empty, and unique name of this condition. |\n| expression | A non-null and non-empty expression of this condition. |\n| tagColor | A color associated with this condition for display purposes in the Firebase Console. Not specifying this value results in the console picking an arbitrary color to associate with the condition. |\n|------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n\nPublic Methods\n--------------\n\n#### public boolean\n**equals**\n(Object o)\n\n\u003cbr /\u003e\n\n#### public String\n**getExpression**\n()\n\nGets the expression of the condition. \n\n##### Returns\n\n- The expression of the condition. \n\n#### public String\n**getName**\n()\n\nGets the name of the condition. \n\n##### Returns\n\n- The name of the condition. \n\n#### public [TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor)\n**getTagColor**\n()\n\nGets the tag color of the condition used for display purposes in the Firebase Console. \n\n##### Returns\n\n- The tag color of the condition. \n\n#### public int\n**hashCode**\n()\n\n\u003cbr /\u003e\n\n#### public [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition)\n**setExpression**\n(String expression)\n\nSets the expression of the condition.\n\nSee [condition expressions](https://firebase.google.com/docs/remote-config/condition-reference) for the expected syntax of this field. \n\n##### Parameters\n\n| expression | The logic of this condition. |\n|------------|------------------------------|\n\n##### Returns\n\n- This [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). \n\n#### public [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition)\n**setName**\n(String name)\n\nSets the name of the condition. \n\n##### Parameters\n\n| name | A non-empty and unique name of this condition. |\n|------|------------------------------------------------|\n\n##### Returns\n\n- This [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition). \n\n#### public [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition)\n**setTagColor**\n([TagColor](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/TagColor) tagColor)\n\nSets the tag color of the condition.\n\nThe color associated with this condition for display purposes in the Firebase Console.\nNot specifying this value results in the console picking an arbitrary color to associate\nwith the condition. \n\n##### Parameters\n\n| tagColor | The tag color of this condition. |\n|----------|----------------------------------|\n\n##### Returns\n\n- This [Condition](/docs/reference/admin/java/reference/com/google/firebase/remoteconfig/Condition)."]]