private static HashSet extendRiverToSide(IBoard board, Point hexloc, int width, int direction, HashMap reverseHex) {
private static HashSet<IHex> extendRiverToSide(IBoard board, Point hexloc, int width, int direction, HashMap reverseHex) {
    private static HashSet extendRiverToSide(IBoard board, Point hexloc, int width, int direction, HashMap reverseHex) {        Point current = new Point(hexloc);        HashSet result = new HashSet();        IHex hex;                hex = board.getHexInDir(current.x, current.y, direction);        while ((hex != null) && (width-- > 0)) {            hex.removeAllTerrains();            hex.addTerrain(Terrains.getTerrainFactory().createTerrain(Terrains.WATER, 1));            result.add(hex);                    current = (Point)reverseHex.get(hex);            hex = board.getHexInDir(current.x, current.y, direction);        }                return result;    }