java - How do I use neo4j Relationship types in a switch statement? -
in reqsdb.java have:
public static enum reltypes implements relationshiptype { identifies, is_member }
in class have:
reqsdb reqsdb = new reqsdb(); (relationship rel : reqsdb.getallrelationships()) { switch (rel.gettype()) { case reqsdb.reltypes.identifies: dostuff(); case reqsdb.reltypes.is_member: dootherstuff(); } }
however, compiler complaining incompatible types , claims
reqsdb.reltypes.identifies
is not constant expression.
is not possible use enum implements relationshiptype in switch statement or doing wrong?
Comments
Post a Comment