Interface Key
- 
- All Known Subinterfaces:
- AnimationCollectionKey,- AnimationPropertyKey,- AnnotationId,- AxisType,- ColorScheme,- DataLabelId,- IsEvent,- IsFill,- IsKeyboardKey,- IsLocaleItem,- IsProgressBarType,- IsShape,- IsToastType,- IsTooltipPosition,- IsTypedAnimationKey,- LabelId,- PropertyKey,- ScaleId,- TransitionKey,- Type
 - All Known Implementing Classes:
- AbsoluteDatasetIndexFill,- AbstractDataPoint.CharbaProperty,- AbstractKey,- AbstractPluginOptions.Property,- AbstractXYDataPoint.XYProperty,- Align,- Align,- Align,- Align,- Align,- Anchor,- Anchor,- AnimationEventType,- AnimationType,- AnnotationType,- AxisKind,- AxisPosition,- BarDatasetOptionsHandler.Property,- BorderAlign,- BorderItemType,- BorderSkipped,- BorderStyle,- Bounds,- BrewerScheme,- Calendar,- CalloutPosition,- CapStyle,- CharacterShape,- ChartAxisType,- ChartEventProperty,- ChartType,- ClipMap,- ColorMode,- ColorType,- CompactDisplay,- ContextType,- ControllerType,- CrossAlign,- CubicInterpolationMode,- Currency,- CurrencyDisplay,- CurrencySign,- CursorType,- CustomTooltipPosition,- DataPointType,- Dataset.CanvasObjectProperty,- Dataset.CommonProperty,- DatasetSeletionEventType,- DataType,- DateTimeStyle,- DecimationAlgorithm,- DefaultAnimationCollectionKey,- DefaultAnimationPropertyKey,- DefaultPluginId,- DefaultProgressBarType,- DefaultScaleId,- DefaultToastType,- DefaultTransitionKey,- Display,- Display,- DrawTime,- DrawTime,- Easing,- ElementAlign,- Event,- Event,- EventType,- Fill,- FillHandler.Property,- FillingMode,- FontStyle,- FormatMatcher,- FormatPartType,- GlobalCompositeOperation,- GoogleChartScheme,- GradientOrientation,- GradientScope,- GradientType,- GwtMaterialScheme,- HourCycle,- Id,- ImageMimeType,- ImageShape,- IndexAxis,- InteractionAxis,- InteractionMode,- Interpolate,- JoinStyle,- KeyboardCommonKey,- KeyboardEditingKey,- KeyboardEventType,- KeyboardFunctionKey,- KeyboardModifierKey,- KeyboardNavigationKey,- KeyboardUiKey,- KeyboardWhitespaceKey,- LabelPosition,- Language,- LegendEventProperty,- LegendTextHandler.Property,- LocaleMatcher,- MeasureUnit,- MeasureUnitDisplay,- MixedItemStyle,- Mode,- Mode,- ModifierKey,- MouseEventType,- MutationType,- Notation,- NumberingSystem,- NumberItemStyle,- OfficeScheme,- Options.CommonProperty,- PluginOptionsScope,- PointerElement,- PointerEventType,- PointerType,- PointStyle,- PointStyleType,- Position,- Position,- Position,- Position,- Position,- Projection,- Region,- RegressionType,- RelativeDatasetIndexFill,- Render,- Render,- Repetition,- ResourceName,- ScaleTitleAlign,- SchemeScope,- Script,- Shape,- SignDisplay,- Size,- SpanGapHandler.Property,- Status,- Stepped,- StringItemStyle,- Style,- TableauScheme,- TextAlign,- TextBaseline,- TextDecoration,- TextDirection,- TickAlign,- TickSource,- TimeUnit,- TimeZone,- TimeZoneName,- TooltipAlign,- TooltipPosition,- TouchEventType,- Unit,- Weight
 
 public interface KeyRepresents the property key of a JavaScript object.
 Used for enum.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Method SummaryAll Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static <T extends Key>
 TcheckAndGetIfValid(T key)Checks if key passed as argument is notnulland its value is notnullas well.
 If not, throw aIllegalArgumentException, otherwise it returns the key.static voidcheckIfValid(Key key)Checks if key passed as argument is notnulland its value is notnullas well.
 If not, throw aIllegalArgumentException.static intcompare(Key k1, Key k2)Compares the two specified key values.static Keycreate(String key)Returns a key instance by its string value.static booleanequals(Key k1, Key k2)Returnstrueif the keys have got the same value.static <T extends Key>
 TgetKeyByValue(T[] enumValues, String value)Returns a key in the an enumeration by the value.static <T extends Key>
 TgetKeyByValue(T[] enumValues, String value, T defaultKey)Returns a key in the an enumeration by the value, or the default key passed as argument.static <T extends Key>
 booleanhasKeyByValue(T[] enumValues, String value)Returnstrueif a key in the an enumeration is related to the value, otherwisefalse.static booleanisValid(Key key)Returnstrueif key passed as argument is notnulland its value is notnullas well.Stringvalue()Returns the name value of property
 
- 
- 
- 
Method Detail- 
createstatic Key create(String key) Returns a key instance by its string value.- Parameters:
- key- string value to use
- Returns:
- a standard key instance
 
 - 
isValidstatic boolean isValid(Key key) Returnstrueif key passed as argument is notnulland its value is notnullas well.- Parameters:
- key- key to be checked
- Returns:
- trueif key passed as argument is not- nulland its value is not- nullas well.
 
 - 
checkIfValidstatic void checkIfValid(Key key) Checks if key passed as argument is notnulland its value is notnullas well.
 If not, throw aIllegalArgumentException.- Parameters:
- key- key to be checked
 
 - 
checkAndGetIfValidstatic <T extends Key> T checkAndGetIfValid(T key) Checks if key passed as argument is notnulland its value is notnullas well.
 If not, throw aIllegalArgumentException, otherwise it returns the key.- Type Parameters:
- T- type of key
- Parameters:
- key- key to be checked
- Returns:
- the same key passed as argument
 
 - 
hasKeyByValuestatic <T extends Key> boolean hasKeyByValue(T[] enumValues, String value) Returnstrueif a key in the an enumeration is related to the value, otherwisefalse.- Type Parameters:
- T- type of key
- Parameters:
- enumValues- enumeration values of keys
- value- value to search in the key
- Returns:
- trueif a key in the an enumeration is related to the value, otherwise- false
 
 - 
getKeyByValuestatic <T extends Key> T getKeyByValue(T[] enumValues, String value) Returns a key in the an enumeration by the value.- Type Parameters:
- T- type of key
- Parameters:
- enumValues- enumeration values of keys
- value- value to search in the key
- Returns:
- the found key by value or null
 
 - 
getKeyByValuestatic <T extends Key> T getKeyByValue(T[] enumValues, String value, T defaultKey) Returns a key in the an enumeration by the value, or the default key passed as argument.- Type Parameters:
- T- type of key
- Parameters:
- enumValues- enumeration values of keys
- value- value to search in the key
- defaultKey- default key instance if the value is not found
- Returns:
- the found key by value or the default one
 
 - 
comparestatic int compare(Key k1, Key k2) Compares the two specified key values.- Parameters:
- k1- the first key to compare
- k2- the second key to compare
- Returns:
- the value 0 if k1 value is equal to k2; a value less than 0 if k1 value is less than k2; and a value greater than 0 if k1 value is greater than k2.
 
 - 
equalsstatic boolean equals(Key k1, Key k2) Returnstrueif the keys have got the same value.- Parameters:
- k1- the first key to compare
- k2- the second key to compare
- Returns:
- trueif the keys have got the same value
 
 - 
valueString value() Returns the name value of property- Returns:
- the name value of property
 
 
- 
 
-