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>
entries
private java.util.List<Entry>
unmodifiable
-
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()
ThrowsUnsupportedOperationException
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 returnstrue
.java.util.Iterator<Entry>
iterator()
boolean
remove(java.lang.Object entry)
int
size()
java.lang.String
toString()
-
-
-
Constructor Detail
-
AbstractDirectory
protected AbstractDirectory(java.util.Collection<? extends Entry> entries)
-
-
Method Detail
-
getEntryById
public Entry getEntryById(java.lang.Object identifier)
- Specified by:
getEntryById
in interfaceDirectory
-
getEntryByFieldName
public Entry getEntryByFieldName(java.lang.String fieldName)
- Specified by:
getEntryByFieldName
in interfaceDirectory
-
iterator
public java.util.Iterator<Entry> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Entry>
-
assertMutable
protected final void assertMutable()
ThrowsUnsupportedOperationException
if 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:
isReadOnly
in interfaceDirectory
- Returns:
true
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object pOther)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-