Modifier and Type | Field and Description |
---|---|
protected long |
id |
protected Map<String,Property<?>> |
propertyMap |
Constructor and Description |
---|
GraphEntity() |
GraphEntity(int propertiesCapacity)
Use this constructor to reduce memory allocations
when properties are added to the edge
|
Modifier and Type | Method and Description |
---|---|
void |
addProperty(Property property)
Add a property to the entity
|
void |
addProperty(String name,
Object value)
Adds a property to the entity, by composing name, type and value to a property object
|
boolean |
equals(Object o) |
Set<String> |
getEntityPropertyNames() |
long |
getId() |
int |
getNumberOfProperties() |
Property |
getProperty(String propertyName) |
int |
hashCode() |
void |
removeProperty(String name) |
void |
setId(long id) |
abstract String |
toString() |
public GraphEntity()
public GraphEntity(int propertiesCapacity)
propertiesCapacity
- preallocate the capacity for the propertiespublic long getId()
public void setId(long id)
id
- - entity id to be setpublic void addProperty(String name, Object value)
name
- value
- public Set<String> getEntityPropertyNames()
public void addProperty(Property property)
property
- public int getNumberOfProperties()
public Property getProperty(String propertyName)
propertyName
- - property name as lookup key (String)public void removeProperty(String name)
name
- - the name of the property to be removedCopyright © 2022. All rights reserved.