public AnnotationMap annotationsAt(final int pos) {
Preconditions.checkElementIndex(pos, doc.size());
class AnnoMap extends HashMap<String, String> implements AnnotationMap {
@Override
public AnnotationMap updateWith(AnnotationsUpdate mutation) {
return new AnnotationMapImpl(this).updateWith(mutation);
}
@Override
public AnnotationMap updateWithNoCompatibilityCheck(AnnotationsUpdate mutation) {
return new AnnotationMapImpl(this).updateWithNoCompatibilityCheck(mutation);
}
}
final AnnoMap annotations = new AnnoMap();
doc.knownKeys().each(new Proc() {
@Override