class Bag extends AbstractCollection<T> implements Serializable {

    public int set(T item, int count) {
        Validate.notNull(item, "item must not be null");
        Integer oldValue = (count == 0) ? map.remove(item) : map.put(item, count);
        if (oldValue != null) {
            size -= oldValue;
        }
        size += count;
        return oldValue != null ? oldValue : 0;
    }

    public  Bag();
    public  Bag(Map<? extends T, ? extends Integer> map);
    private  Bag(Map<T, Integer> map, int size);
    public  Bag(Iterable<? extends T> iterable);

}