diff options
author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
---|---|---|
committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-01-09 19:58:05 +0000 |
commit | 65bf3316cf384588453604be6b4f0ed3751a8b0f (patch) | |
tree | 996a5f57d4a68c53473382e45cb22f574cb3e4db /libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java | |
parent | 8fc56618a84446beccd45b80381cdfe0e94050df (diff) | |
download | gcc-65bf3316cf384588453604be6b4f0ed3751a8b0f.tar.gz |
Merged gcj-eclipse branch to trunk.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@120621 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java')
-rw-r--r-- | libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java b/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java index aad30447c2f..78fad1a15f0 100644 --- a/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java +++ b/libjava/classpath/javax/imageio/metadata/IIOMetadataFormatImpl.java @@ -462,7 +462,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat int dataType, boolean required, String defaultValue, - List enumeratedValues) + List<String> enumeratedValues) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); node.setAttributeNode (new IIOMetadataNodeAttrEnumerated (node, @@ -568,8 +568,8 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat node.setUserObject (null); } - protected void addObjectValue (String elementName, Class classType, - boolean required, Object defaultValue) + protected <T> void addObjectValue (String elementName, Class<T> classType, + boolean required, T defaultValue) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); addNodeObject (node, new NodeObject (node, @@ -578,9 +578,9 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat defaultValue)); } - protected void addObjectValue (String elementName, Class classType, - boolean required, Object defaultValue, - List enumeratedValues) + protected <T> void addObjectValue (String elementName, Class<T> classType, + boolean required, T defaultValue, + List<? extends T> enumeratedValues) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); addNodeObject (node, new NodeObjectEnumerated (node, @@ -590,12 +590,13 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat enumeratedValues)); } - protected void addObjectValue (String elementName, Class classType, - Object defaultValue, - Comparable minValue, - Comparable maxValue, - boolean minInclusive, - boolean maxInclusive) + protected <T extends Object & Comparable<? super T>> + void addObjectValue (String elementName, Class<T> classType, + T defaultValue, + Comparable<? super T> minValue, + Comparable<? super T> maxValue, + boolean minInclusive, + boolean maxInclusive) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); addNodeObject (node, new NodeObjectBounded (node, @@ -607,7 +608,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat maxInclusive)); } - protected void addObjectValue (String elementName, Class classType, + protected void addObjectValue (String elementName, Class<?> classType, int arrayMinLength, int arrayMaxLength) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); @@ -836,7 +837,7 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat return ((Integer) ((NodeObjectArray) getNodeObject (node)).getArrayMinLength ()).intValue(); } - public Class getObjectClass (String elementName) + public Class<?> getObjectClass (String elementName) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); return getNodeObject (node).getClassType (); @@ -854,13 +855,13 @@ public abstract class IIOMetadataFormatImpl implements IIOMetadataFormat return ((NodeObjectEnumerated) getNodeObject (node)).getEnumerations (); } - public Comparable getObjectMaxValue (String elementName) + public Comparable<?> getObjectMaxValue (String elementName) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); return ((NodeObjectBounded) getNodeObject (node)).getMaxValue (); } - public Comparable getObjectMinValue (String elementName) + public Comparable<?> getObjectMinValue (String elementName) { IIOMetadataNode node = (IIOMetadataNode) nodes.get (elementName); return ((NodeObjectBounded) getNodeObject (node)).getMinValue (); |