MCPcopy Create free account
hub / github.com/BaseXdb/basex / ddo

Method ddo

basex-core/src/main/java/org/basex/util/list/IntList.java:238–249  ·  view source on GitHub ↗

Sorts the data and removes distinct values. @return self reference

()

Source from the content-addressed store, hash-verified

236 * @return self reference
237 */
238 public IntList ddo() {
239 if(!isEmpty()) {
240 sort();
241 int i = 1;
242 for(int j = 1; j < size; ++j) {
243 while(j < size && list[i - 1] == list[j]) j++;
244 if(j < size) list[i++] = list[j];
245 }
246 size = i;
247 }
248 return this;
249 }
250
251 /**
252 * Sorts the data and returns an array with offsets to the sorted array.

Callers 2

valueMethod · 0.95
executeMethod · 0.95

Calls 2

sortMethod · 0.95
isEmptyMethod · 0.45

Tested by

no test coverage detected