MCPcopy Create free account
hub / github.com/GateNLP/gate-core / inDocumentOrder

Method inDocumentOrder

src/main/java/gate/Utils.java:646–653  ·  view source on GitHub ↗

Return a List containing the annotations in the given annotation set, in document order (i.e. increasing order of start offset). @param as the annotation set @return a list containing the annotations from as in document order.

(AnnotationSet as)

Source from the content-addressed store, hash-verified

644 * order.
645 */
646 public static List<Annotation> inDocumentOrder(AnnotationSet as) {
647 List<Annotation> ret = new ArrayList<Annotation>();
648 if(as != null) {
649 ret.addAll(as);
650 Collections.sort(ret, OFFSET_COMPARATOR);
651 }
652 return ret;
653 }
654
655 /**
656 * A single instance of {@link OffsetComparator} that can be used by any code

Callers

nothing calls this directly

Calls 2

addAllMethod · 0.45
sortMethod · 0.45

Tested by

no test coverage detected