public abstract class MetadataEntity extends AbstractEntity
| Modifier and Type | Class and Description |
|---|---|
static class |
MetadataEntity.Builder
Builder.
|
UUID_COMPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
MetadataEntity()
Constructs an instance.
|
protected |
MetadataEntity(MetadataEntity other)
Constructs an instance from an other.
|
protected |
MetadataEntity(Optional<String> name,
Optional<UUID> uuid,
Optional<KeyedGroups> attributes,
Optional<Map<String,Text>> texts)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addText(Text text)
Adds text.
|
boolean |
equals(Object other)
|
Optional<KeyedGroups> |
getAttributes()
Gets the attributes.
|
Optional<Attributes> |
getAttributes(String usage)
Gets the attributes for an usage.
|
Optional<Map<String,Text>> |
getTexts()
Gets the texts.
|
int |
hashCode() |
void |
setAttributes(Optional<KeyedGroups> attributes)
Sets attributes.
|
compareTo, getName, getNameInUpperCase, getThisLogger, getUUID, setName, setUUID, toStringcopy, getElementName, getPrefix, getReferenceNameprotected MetadataEntity()
protected MetadataEntity(@Nonnull
MetadataEntity other)
other - The other instance.protected MetadataEntity(@Nonnull
Optional<String> name,
@Nonnull
Optional<UUID> uuid,
@Nonnull
Optional<KeyedGroups> attributes,
@Nonnull
Optional<Map<String,Text>> texts)
name - The optional entity name.uuid - The optional entity UUID.attributes - The optional attributes.texts - The optional texts.public final void addText(@Nonnull
Text text)
text - The text.public boolean equals(Object other)
For two Entity to be equal, they must at least be instances of
the same class, have the same UUID and name.
For two Metadata Entity to be equal, they must at
least be instances of the same class, have the same UUID,
Attributes, name and descriptive texts.
equals in class AbstractEntity@Nonnull @CheckReturnValue public final Optional<KeyedGroups> getAttributes()
public final Optional<Attributes> getAttributes(String usage)
getAttributes in interface EntitygetAttributes in class AbstractEntityusage - The usage.@Nonnull @CheckReturnValue public final Optional<Map<String,Text>> getTexts()
public int hashCode()
hashCode in class AbstractEntitypublic final void setAttributes(@Nonnull
Optional<KeyedGroups> attributes)
attributes - The optional attributes.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.