Modifier and Type | Field and Description |
---|---|
protected long |
id |
protected java.util.Map<java.lang.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(java.lang.String name,
java.lang.Object value)
Adds a property to the entity, by composing name, type and value to a property object
|
boolean |
equals(java.lang.Object o) |
java.util.Set<java.lang.String> |
getEntityPropertyNames() |
long |
getId() |
int |
getNumberOfProperties() |
Property |
getProperty(java.lang.String propertyName) |
int |
hashCode() |
void |
removeProperty(java.lang.String name) |
void |
setId(long id) |
abstract java.lang.String |
toString() |
protected long id
protected final java.util.Map<java.lang.String,Property<?>> propertyMap
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(java.lang.String name, java.lang.Object value)
name
- value
- public java.util.Set<java.lang.String> getEntityPropertyNames()
public void addProperty(Property property)
property
- public int getNumberOfProperties()
public Property getProperty(java.lang.String propertyName)
propertyName
- - property name as lookup key (String)public void removeProperty(java.lang.String name)
name
- - the name of the property to be removedpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public abstract java.lang.String toString()
toString
in class java.lang.Object
Copyright © 2023. All rights reserved.