Make EdgeDirection val instead of case object for Java compat.