/** * Creates a new compact entry from the provided entry. * * @param entry The entry to use to create this compact entry. It must not * be {@code null}. */ public CompactEntry(final Entry entry) { ensureNotNull(entry); dn = entry.getDN(); hashCode = -1; final Collection<Attribute> attrs = entry.getAttributes(); attributes = new CompactAttribute[attrs.size()]; final Iterator<Attribute> iterator = attrs.iterator(); for (int i=0; i < attributes.length; i++) { attributes[i] = new CompactAttribute(iterator.next()); } }
/** * Creates a new compact entry from the provided entry. * * @param entry The entry to use to create this compact entry. It must not * be {@code null}. */ public CompactEntry(final Entry entry) { ensureNotNull(entry); dn = entry.getDN(); hashCode = -1; final Collection<Attribute> attrs = entry.getAttributes(); attributes = new CompactAttribute[attrs.size()]; final Iterator<Attribute> iterator = attrs.iterator(); for (int i=0; i < attributes.length; i++) { attributes[i] = new CompactAttribute(iterator.next()); } }