Class AbstractDirectory
- java.lang.Object
-
- com.twelvemonkeys.imageio.metadata.AbstractDirectory
-
- Direct Known Subclasses:
AbstractCompoundDirectory,IFD,IPTCDirectory,PSDDirectory,RDFDescription
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$
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<Entry>entriesprivate java.util.List<Entry>unmodifiable
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractDirectory(java.util.Collection<? extends Entry> entries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(Entry entry)protected voidassertMutable()ThrowsUnsupportedOperationExceptionif this directory is read-only.booleanequals(java.lang.Object pOther)EntrygetEntryByFieldName(java.lang.String fieldName)EntrygetEntryById(java.lang.Object identifier)inthashCode()booleanisReadOnly()This implementation returnstrue.java.util.Iterator<Entry>iterator()booleanremove(java.lang.Object entry)intsize()java.lang.StringtoString()
-
-
-
Constructor Detail
-
AbstractDirectory
protected AbstractDirectory(java.util.Collection<? extends Entry> entries)
-
-
Method Detail
-
getEntryById
public Entry getEntryById(java.lang.Object identifier)
- Specified by:
getEntryByIdin interfaceDirectory
-
getEntryByFieldName
public Entry getEntryByFieldName(java.lang.String fieldName)
- Specified by:
getEntryByFieldNamein interfaceDirectory
-
iterator
public java.util.Iterator<Entry> iterator()
- Specified by:
iteratorin interfacejava.lang.Iterable<Entry>
-
assertMutable
protected final void assertMutable()
ThrowsUnsupportedOperationExceptionif this directory is read-only.- Throws:
java.lang.UnsupportedOperationException- if this directory is read-only.- See Also:
isReadOnly()
-
isReadOnly
public boolean isReadOnly()
This implementation returnstrue. Subclasses should override this method, if the directory is mutable.- Specified by:
isReadOnlyin interfaceDirectory- Returns:
true
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object pOther)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-