@Override
public TitanEdge getEdge(Object id) {
if (id == null) throw ExceptionFactory.edgeIdCanNotBeNull();
RelationIdentifier rid = null;
try {
if (id instanceof TitanEdge) rid = (RelationIdentifier) ((TitanEdge) id).getId();
else if (id instanceof RelationIdentifier) rid = (RelationIdentifier) id;
else if (id instanceof String) rid = RelationIdentifier.parse((String) id);
else if (id instanceof long[]) rid = RelationIdentifier.get((long[]) id);
else if (id instanceof int[]) rid = RelationIdentifier.get((int[]) id);
} catch (IllegalArgumentException e) {
return null;
}
if (rid != null) return rid.findEdge(this);
else return null;
}