@Override
  public void fromData(DataInput in,
      DeserializationContext context) throws IOException, ClassNotFoundException {
    int size = in.readInt();
    elementType = context.getDeserializer().readObject(in);
    for (int j = size; j > 0; j--) {
      add(context.getDeserializer().readObject(in));
    }
  }
Implementation of SelectResults that extends TreeSet This is the sorted version of ResultSet used
for order by clause If the elements are Structs, then use SortedStructSet instead.

@since GemFire 4.0
geode-core/src/main/java/org/apache/geode/cache/query/internal/SortedResultSet.java