class ZzzzzzRepository extends NodeRepository<ZzzzzzBlock> {
    private ArrayList<ZzzzzzBlock> referencedZzzzzzBlocks = new ArrayList<>();

    public ZzzzzzRepository(DataHolder options) {
        super(ZzzzzzExtension.ZZZZZZS_KEEP.get(options));
    }

    public void addZzzzzzReference(ZzzzzzBlock zzzzzzBlock, Zzzzzz zzzzzz) {
        if (!zzzzzzBlock.isReferenced()) {
            referencedZzzzzzBlocks.add(zzzzzzBlock);
        }

        zzzzzzBlock.setFirstReferenceOffset(zzzzzz.getStartOffset());
    }

    public void resolveZzzzzzOrdinals() {<FILL_FUNCTION_BODY>}

    public List<ZzzzzzBlock> getReferencedZzzzzzBlocks() {
        return referencedZzzzzzBlocks;
    }

    @NotNull
    @Override
    public DataKey<ZzzzzzRepository> getDataKey() {
        return ZzzzzzExtension.ZZZZZZS;
    }

    @NotNull
    @Override
    public DataKey<KeepType> getKeepDataKey() {
        return ZzzzzzExtension.ZZZZZZS_KEEP;
    }

    @NotNull
    @Override
    public Set<ZzzzzzBlock> getReferencedElements(Node parent) {
        HashSet<ZzzzzzBlock> references = new HashSet<>();
        //visitNodes(parent, new ValueRunnable<Node>() {
        //    @Override
        //    public void run(Node value) {
        //        if (value instanceof Zzzzzz) {
        //            //Reference reference = ((RefNode) value).getReferenceNode(ZzzzzzRepository.this);
        //            //if (reference != null) {
        //            //    references.add(reference);
        //            //}
        //        }
        //    }
        //}, Zzzzzz.class);
        return references;
    }
}

        // need to sort by first referenced offset then set each to its ordinal position in the array+1
        referencedZzzzzzBlocks.sort((f1, f2) -> f1.getFirstReferenceOffset() - f2.getFirstReferenceOffset());
        int ordinal = 0;
        for (ZzzzzzBlock zzzzzzBlock : referencedZzzzzzBlocks) {
            zzzzzzBlock.setZzzzzzOrdinal(++ordinal);
        }
    
<methods>public void <init>(@Nullable KeepType) ,public void clear() ,public boolean containsKey(@NotNull Object) ,public boolean containsValue(java.lang.Object) ,public @NotNull Set<Map.Entry<String,ZzzzzzBlock>> entrySet() ,public boolean equals(java.lang.Object) ,public @Nullable ZzzzzzBlock get(@NotNull Object) ,public abstract @NotNull DataKey<? extends NodeRepository<ZzzzzzBlock>> getDataKey() ,public @Nullable ZzzzzzBlock getFromRaw(@NotNull CharSequence) ,public abstract @NotNull DataKey<KeepType> getKeepDataKey() ,public abstract @NotNull Set<ZzzzzzBlock> getReferencedElements(com.vladsch.flexmark.util.ast.Node) ,public @NotNull Collection<ZzzzzzBlock> getValues() ,public int hashCode() ,public boolean isEmpty() ,public @NotNull Set<String> keySet() ,public @NotNull String normalizeKey(@NotNull CharSequence) ,public @Nullable ZzzzzzBlock put(@NotNull String, @NotNull ZzzzzzBlock) ,public void putAll(@NotNull Map<? extends String,? extends ZzzzzzBlock>) ,public @Nullable ZzzzzzBlock putRawKey(@NotNull CharSequence, @NotNull ZzzzzzBlock) ,public @Nullable ZzzzzzBlock remove(@NotNull Object) ,public int size() ,public static boolean transferReferences(@NotNull NodeRepository<T>, @NotNull NodeRepository<T>, boolean, @Nullable Map<String,String>) ,public @NotNull List<ZzzzzzBlock> values() <variables>protected final non-sealed com.vladsch.flexmark.util.ast.KeepType keepType,protected final ArrayList<com.vladsch.flexmark.ext.zzzzzz.ZzzzzzBlock> nodeList,protected final Map<java.lang.String,com.vladsch.flexmark.ext.zzzzzz.ZzzzzzBlock> nodeMap