class DBaseFileAttributeCollection extends DBaseFileAttributeProvider implements ROMBasedAttributeCollection {

	@Pure
	@Override
	public Map<AttributeType, Collection<Attribute>> getAllAttributesByType() {
		final Map<AttributeType, Collection<Attribute>> map = super.getAllAttributesByType();
		if (this.buffer != null) {
			Collection<Attribute> col;
			for (final Attribute attr : this.buffer.values()) {
				col = map.get(attr.getType());
				if (col == null) {
					col = new HashSet<>();
					map.put(attr.getType(), col);
				}
				if (!(col instanceof Set<?>)) {
					col.remove(attr);
				}
				col.add(attr);
			}
		}
		return map;
	}

	  DBaseFileAttributeCollection(DBaseFileAttributeAccessor accessor);

}