code: public static Direction createDirection(AtlasEdgeDirection dir) {
  
          switch(dir) {
          case IN:
              return Direction.IN;
          case OUT:
              return Direction.OUT;
          case BOTH:
              return Direction.BOTH;
          default:
              throw new RuntimeException("Unrecognized direction: " + dir);
          }
      }
docs: Retrieves the titan direction corresponding to the given
  AtlasEdgeDirection.
  
  @param dir
  @return