Class AbstractDirectory

  • All Implemented Interfaces:
    Directory, java.lang.Iterable<Entry>
    Direct Known Subclasses:
    AbstractCompoundDirectory, IFD

    public abstract class AbstractDirectory
    extends java.lang.Object
    implements Directory
    AbstractDirectory
    Version:
    $Id: AbstractDirectory.java,v 1.0 Nov 11, 2009 5:31:04 PM haraldk Exp$
    Author:
    Harald Kuhr, last modified by $Author: haraldk$
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractDirectory​(java.util.Collection<? extends Entry> entries)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean add​(Entry entry)  
      protected void assertMutable()
      Throws UnsupportedOperationException if this directory is read-only.
      boolean equals​(java.lang.Object pOther)  
      Entry getEntryByFieldName​(java.lang.String fieldName)  
      Entry getEntryById​(java.lang.Object identifier)  
      int hashCode()  
      boolean isReadOnly()
      This implementation returns true.
      java.util.Iterator<Entry> iterator()  
      boolean remove​(java.lang.Object entry)  
      int size()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
    • Constructor Detail

      • AbstractDirectory

        protected AbstractDirectory​(java.util.Collection<? extends Entry> entries)
    • Method Detail

      • iterator

        public java.util.Iterator<Entry> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<Entry>
      • assertMutable

        protected final void assertMutable()
        Throws UnsupportedOperationException if this directory is read-only.
        Throws:
        java.lang.UnsupportedOperationException - if this directory is read-only.
        See Also:
        isReadOnly()
      • add

        public boolean add​(Entry entry)
        Specified by:
        add in interface Directory
      • remove

        public boolean remove​(java.lang.Object entry)
        Specified by:
        remove in interface Directory
      • size

        public int size()
        Specified by:
        size in interface Directory
      • isReadOnly

        public boolean isReadOnly()
        This implementation returns true. Subclasses should override this method, if the directory is mutable.
        Specified by:
        isReadOnly in interface Directory
        Returns:
        true
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object pOther)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object