class PdfGlyphArray {

    private final LinkedList<Object> list = new LinkedList<>();

    public void add(float displacement) {
        list.add(displacement);
    }

    public void add(int glyphCode) {<FILL_FUNCTION_BODY>}

    List<Object> getList() {
        return Collections.unmodifiableList(list);
    }

    public void clear() {
        list.clear();
    }

    public boolean isEmpty() {
        return list.isEmpty();
    }

    public static class GlyphSubList extends ArrayList<Integer> {

    }
}

        Object last = list.peekLast();
        GlyphSubList glyphSublist;
        if (last instanceof GlyphSubList) {
            glyphSublist = (GlyphSubList) last;
        } else {
            glyphSublist = new GlyphSubList();
            list.add(glyphSublist);
        }
        glyphSublist.add(glyphCode);
    
<no_super_class>