public int add(int listID) {
        if ((listID < 0) || (listID >= numLists)) {
            throw new IndexOutOfBoundsException();
        }

		int index=allocate();
        if (index >= 0) {
            links[index] = heads[listID];
		    heads[listID] = index;
        }
		return index;
	}
Allocates a new index resource and adds it to the front of the linked list
indexed by listID.
@param listID the id of the list to add to.
@exception IndexOutOfBoundsException thrown if the listID is not in the
the range [0, numLists).
Ghidra/Framework/Generic/src/main/java/ghidra/util/datastruct/IntListIndexer.java