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 Jul 24, 2012
·
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 en EnumMap instead, thereby saving a lot of RAM and possible 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));