public abstract class AbstractNamedImmutableModel extends AbstractImmutableModel implements NamedObject, HasDisplayModel
NamedObject
introspection modelsdescription, modelProperties
Modifier | Constructor and Description |
---|---|
protected |
AbstractNamedImmutableModel(String name,
String description,
DisplayModel displayModel,
Set<ModelProperty> modelProperties)
Creates a new instance
|
Modifier and Type | Method and Description |
---|---|
protected static void |
checkArgument(boolean condition,
String message) |
boolean |
equals(Object obj)
Defines object equality based on the given object
being an object of this class and in the equality
of the
getName() attributes |
Optional<DisplayModel> |
getDisplayModel() |
String |
getName()
Gets the name of the object
|
int |
hashCode()
Calculates hashcode based on
getName() |
String |
toString() |
copy, copy, getDescription, getModelProperties, getModelProperty
protected AbstractNamedImmutableModel(String name, String description, DisplayModel displayModel, Set<ModelProperty> modelProperties)
name
- the model's namedescription
- the model's descriptiondisplayModel
- a model containing directives about how this component is to be displayed in the UImodelProperties
- A Set
of custom properties which extend this modelIllegalArgumentException
- if name
is blankprotected static void checkArgument(boolean condition, String message)
public final String getName()
getName
in interface NamedObject
public Optional<DisplayModel> getDisplayModel()
getDisplayModel
in interface HasDisplayModel
Optional
DisplayModel
which contains
directives about how this model should be displayed in the UIpublic boolean equals(Object obj)
getName()
attributespublic int hashCode()
getName()
public String toString()
toString
in class AbstractImmutableModel
Copyright © 2018. All rights reserved.