@Override public EnumSet<Direction> getDirectionsByPosition(Position position) {
    EnumSet<Direction> directions = EnumSet.complementOf(
        EnumSet.of(Direction.WEST, Direction.EAST));

    if (position.isFirstColumn()) {
      directions.add(Direction.WEST);
    }
    if (position.isLastColumn()) {
      directions.add(Direction.EAST);
    }

    return directions;
  }
Selector that applies to all the items in a single row grouping them as a single item.
dividers/src/main/java/com/karumi/dividers/selector/RowGroupSelector.java