public abstract class AbstractEntity extends Object implements Entity
| Modifier and Type | Class and Description |
|---|---|
static class |
AbstractEntity.Builder
Builder.
|
UUID_COMPARATOR| Modifier | Constructor and Description |
|---|---|
protected |
AbstractEntity()
Constructs an instance.
|
protected |
AbstractEntity(AbstractEntity other)
Constructs an instance from an other.
|
protected |
AbstractEntity(Optional<String> name,
Optional<UUID> uuid)
Constructs an instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Entity other)
Implements Comparable.
|
boolean |
equals(Object other)
|
Optional<Attributes> |
getAttributes(String usage)
Gets the attributes for an usage.
|
Optional<String> |
getName()
Gets the name of this.
|
Optional<String> |
getNameInUpperCase()
Gets the name of this in upper case.
|
protected Logger |
getThisLogger()
Gets the logger.
|
Optional<UUID> |
getUUID()
Gets the UUID of this Entity.
|
int |
hashCode() |
void |
setName(Optional<String> name)
Sets the name of this Entity.
|
void |
setUUID(Optional<UUID> uuid)
Sets the UUID of this Entity.
|
String |
toString() |
copy, getElementName, getPrefix, getReferenceNameprotected AbstractEntity()
protected AbstractEntity(@Nonnull
AbstractEntity other)
other - The other instance.protected AbstractEntity(@Nonnull
Optional<String> name,
@Nonnull
Optional<UUID> uuid)
name - The optional instance name.uuid - The optional instance UUID.public int compareTo(Entity other)
compareTo in interface Comparable<Entity>other - An other Entity.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.
equals in class Objectpublic Optional<Attributes> getAttributes(String usage)
getAttributes in interface Entityusage - The usage.public final Optional<String> getName()
public final Optional<String> getNameInUpperCase()
getNameInUpperCase in interface Entitypublic final Optional<UUID> getUUID()
public int hashCode()
hashCode in class Objectpublic final void setName(@Nonnull
Optional<String> name)
name - The optional name.public final void setUUID(@Nonnull
Optional<UUID> uuid)
uuid - The optional UUID.public String toString()
toString in class Object@Nonnull @CheckReturnValue protected final Logger getThisLogger()
Copyright © 2003-2019 Serge Brisson. All Rights Reserved.