code: public static <E extends Enum<E>> StreamableEnumSet<E> range (E from, E to)
      {
          Class<E> elementType = from.getDeclaringClass();
          StreamableEnumSet<E> set = new StreamableEnumSet<E>(elementType);
          E[] constants = elementType.getEnumConstants();
          for (int ii = from.ordinal(), last = to.ordinal(); ii <= last; ii++) {
              set.add(constants[ii]);
          }
          return set;
      }
docs: Creates a set that includes all enum constants in the specified (inclusive) range.