public boolean shouldIncrement(int value, Object k, WriteSession output,
                int fieldNumber) throws IOException
        {
            Object[] tab = table;
            int len = tab.length;
            int i = hash(k, len);

            Object item;
            while ((item = tab[i]) != null)
            {
                if (item == k)
                {
                    if (k instanceof Map.Entry
                            // filter on standard java map impls only
                            && k.getClass().getName().startsWith("java.util"))
                    {
                        // IdentityHashMap and EnumMap re-uses the same Map.Entry.
                        // It simply holds references to the actual data (key/value).
                        return true;
                    }

                    output.tail = output.sink.writeVarInt32(
                            ((Integer) tab[i + 1]).intValue(),
                            output,
                            output.sink.writeVarInt32(
                                    makeTag(fieldNumber, WIRETYPE_REFERENCE),
                                    output,
                                    output.tail));

                    return false;
                }
                i = nextKeyIndex(i, len);
            }

            // modCount++;
            tab[i] = k;
            tab[i + 1] = Integer.valueOf(value);
            if (++size >= threshold)
                resize(len); // len == 2 * current capacity.
            return true;
        }
Returns true if the provided int should increment(unique index id).
protostuff-core/src/main/java/io/protostuff/GraphProtostuffOutput.java