Interface ISeqEntry

All Superinterfaces:
Iterable<Attribute>
All Known Implementing Classes:
MapEntry, SeqEntry

public interface ISeqEntry extends Iterable<Attribute>
ISeqEntry is an interface that both SeqEntry and MapEntry implement, covering just the SeqEntry features. This allows a MapEntry to be returned as an ISeqEntry, avoiding conversion. It also allows the original MapEntry to be recovered without conversion: getMapEntry() does this, or converts the entry to a MapEntry if it is in fact a SeqEntry.
Author:
jp
  • Method Details

    • add

      void add(Attribute attr)
      Add a new attribute. Note that for efficiency, there is no check whether the attribute is already present. The caller should know that the attribute doesn't already exist. Attributes without any values are skipped.
      Parameters:
      attr - Attribute to add
    • iterator

      Iterator<Attribute> iterator()
      Iterator
      Specified by:
      iterator in interface Iterable<Attribute>
      Returns:
      Iterator
    • isEmpty

      boolean isEmpty()
      Is the entry empty (no attributes)?
    • getDN

      DN getDN()
      Get the DN
      Returns:
      DN
    • setDN

      void setDN(DN dn)
      Set the DN
    • getOrigDN

      DN getOrigDN()
      Get the original DN
      Returns:
      DN
    • setOrigDN

      void setOrigDN(DN dn)
      Set the original DN. This is normally a bad idea, as the original DN must usually be maintained to refer back to the original source of the entry correctly.
    • hasDNChanged

      boolean hasDNChanged()
      Check whether the DN has changed (relative to the original DN).
    • toAddEntry

      AddEntry toAddEntry()
      Convert to an AddEntry
      Returns:
      AddEntry
    • toEntry

      Entry toEntry()
      Convert to an Entry
      Returns:
      Entry
    • getMapEntry

      MapEntry getMapEntry()
      Get this entry as a MapEntry. If the underlying class is a SeqEntry, it will be converted. If the underlying class is already a MapEntry, then the same reference is returned.
      Returns:
      MapEntry