You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jon Ivmark edited this page Nov 28, 2013
·
5 revisions
Nodes as well as edges can have arbitrary properties associated with them. The default way of storing properties is in a HashMap. If you know the set of keys that will be used you can store the properties in an EnumMap instead, thereby saving a lot of RAM and possibly gaining some speed as well.
An example:
public static enum ArtistProperty {
NAME, URL, PICTURE_URL;
}
public static final NodeType ARTIST =
new NodeTypeImpl("Artist",
new EnumMapPropertiesFactory<ArtistProperty>(ArtistProperty.class));
The same can be achieved with EdgeTypeImpl for edges.