Package com.google.gerrit.common.data
Enum LabelFunction
- java.lang.Object
- 
- java.lang.Enum<LabelFunction>
- 
- com.google.gerrit.common.data.LabelFunction
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<LabelFunction>
 
 public enum LabelFunction extends Enum<LabelFunction> Functions for determining submittability based on label votes.Only describes built-in label functions. Admins can extend the logic arbitrarily using Prolog rules, in which case the choice of function in the project config is ignored. Function semantics are documented in config-labels.txt, and actual behavior is implemented in Prolog ingerrit_common.pl.
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description ANY_WITH_BLOCKMAX_NO_BLOCKMAX_WITH_BLOCKNO_BLOCKNO_OPPATCH_SET_LOCK
 - 
Field SummaryFields Modifier and Type Field Description static Map<String,LabelFunction>ALL
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFunctionName()The function name as defined in documentation andproject.config.booleanisBlock()Whether the label is a "block" label, meaning a minimum vote will prevent submission.static Optional<LabelFunction>parse(String str)static LabelFunctionvalueOf(String name)Returns the enum constant of this type with the specified name.static LabelFunction[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
MAX_WITH_BLOCKpublic static final LabelFunction MAX_WITH_BLOCK 
 - 
ANY_WITH_BLOCKpublic static final LabelFunction ANY_WITH_BLOCK 
 - 
MAX_NO_BLOCKpublic static final LabelFunction MAX_NO_BLOCK 
 - 
NO_BLOCKpublic static final LabelFunction NO_BLOCK 
 - 
NO_OPpublic static final LabelFunction NO_OP 
 - 
PATCH_SET_LOCKpublic static final LabelFunction PATCH_SET_LOCK 
 
- 
 - 
Field Detail- 
ALLpublic static final Map<String,LabelFunction> ALL 
 
- 
 - 
Method Detail- 
valuespublic static LabelFunction[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LabelFunction c : LabelFunction.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static LabelFunction valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
 - 
parsepublic static Optional<LabelFunction> parse(String str) 
 - 
getFunctionNamepublic String getFunctionName() The function name as defined in documentation andproject.config.
 - 
isBlockpublic boolean isBlock() Whether the label is a "block" label, meaning a minimum vote will prevent submission.
 
- 
 
-