Suppose you have an enum Direction
enum Direction{ North,South,East West }
Could I write a method that uses bitwise or\'s to compare mu
You can't use a bitwise or like that. Try something more like this:
public boolean canGoDirection(Set dirs){ return dirs.contains(Direction.North); }
called like this:
this.canGoDirection(EnumSet.of(Direction.South,Direction.North));