diff options
Diffstat (limited to 'libjava/classpath/javax/print/attribute')
70 files changed, 161 insertions, 101 deletions
diff --git a/libjava/classpath/javax/print/attribute/Attribute.java b/libjava/classpath/javax/print/attribute/Attribute.java index 7ce0247cea1..8b98377ba22 100644 --- a/libjava/classpath/javax/print/attribute/Attribute.java +++ b/libjava/classpath/javax/print/attribute/Attribute.java @@ -52,7 +52,7 @@ public interface Attribute extends Serializable * * @return The concrete {@link Class} instance of the attribute class. */ - Class getCategory (); + Class< ? extends Attribute> getCategory (); /** * Returns the descriptive name of the attribute category. diff --git a/libjava/classpath/javax/print/attribute/AttributeSet.java b/libjava/classpath/javax/print/attribute/AttributeSet.java index b4bdecad254..c8130c19f14 100644 --- a/libjava/classpath/javax/print/attribute/AttributeSet.java +++ b/libjava/classpath/javax/print/attribute/AttributeSet.java @@ -110,7 +110,7 @@ public interface AttributeSet * @return <code>true</code> if an attribute of the category is contained * in the set, <code>false</code> otherwise. */ - boolean containsKey (Class category); + boolean containsKey (Class<?> category); /** * Checks if this attribute set contains the given attribute. @@ -143,7 +143,7 @@ public interface AttributeSet * @throws ClassCastException if category is not implementing * <code>Attribute</code>. */ - Attribute get (Class category); + Attribute get (Class<?> category); /** * Returns the hashcode value. The hashcode value is the sum of all hashcodes @@ -178,7 +178,7 @@ public interface AttributeSet * @return <code>true</code> if an attribute is removed, false in all other cases. * @throws UnmodifiableSetException if the set does not support modification. */ - boolean remove (Class category); + boolean remove (Class<?> category); /** * Returns the number of elements in this attribute set. diff --git a/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java b/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java index f6a64ebc531..95c11a6ed1a 100644 --- a/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java +++ b/libjava/classpath/javax/print/attribute/AttributeSetUtilities.java @@ -435,8 +435,8 @@ public final class AttributeSetUtilities * that implements interfaceName * @exception NullPointerException if object is null */ - public static Class verifyAttributeCategory(Object object, - Class interfaceName) + public static Class<?> verifyAttributeCategory(Object object, + Class<?> interfaceName) { if (object == null) throw new NullPointerException("object may not be null"); @@ -461,7 +461,7 @@ public final class AttributeSetUtilities * @exception NullPointerException if object is null */ public static Attribute verifyAttributeValue(Object object, - Class interfaceName) + Class<?> interfaceName) { if (object == null) throw new NullPointerException("object may not be null"); @@ -482,7 +482,7 @@ public final class AttributeSetUtilities * @exception IllegalArgumentException if the categories are not equal * @exception NullPointerException if category is null */ - public static void verifyCategoryForValue(Class category, + public static void verifyCategoryForValue(Class<?> category, Attribute attribute) { if (category == null || attribute == null) diff --git a/libjava/classpath/javax/print/attribute/HashAttributeSet.java b/libjava/classpath/javax/print/attribute/HashAttributeSet.java index 65371ea9fa2..0f6b00730a8 100644 --- a/libjava/classpath/javax/print/attribute/HashAttributeSet.java +++ b/libjava/classpath/javax/print/attribute/HashAttributeSet.java @@ -110,7 +110,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * * @exception NullPointerException if interfaceName is null */ - protected HashAttributeSet(Class interfaceName) + protected HashAttributeSet(Class<?> interfaceName) { if (interfaceName == null) throw new NullPointerException("interfaceName may not be null"); @@ -129,7 +129,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * interfaceName * @exception NullPointerException if attribute or interfaceName is null */ - protected HashAttributeSet(Attribute attribute, Class interfaceName) + protected HashAttributeSet(Attribute attribute, Class<?> interfaceName) { this(interfaceName); @@ -151,7 +151,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * interface of interfaceName * @exception NullPointerException if attributes or interfaceName is null */ - protected HashAttributeSet(Attribute[] attributes, Class interfaceName) + protected HashAttributeSet(Attribute[] attributes, Class<?> interfaceName) { this(interfaceName); @@ -173,7 +173,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * @exception ClassCastException if any element of attributes is not an * interface of interfaceName */ - protected HashAttributeSet(AttributeSet attributes, Class interfaceName) + protected HashAttributeSet(AttributeSet attributes, Class<?> interfaceName) { this(interfaceName); @@ -256,7 +256,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * @return <code>true</code> if an attribute of the category is contained * in the set, <code>false</code> otherwise. */ - public boolean containsKey(Class category) + public boolean containsKey(Class<?> category) { return attributeMap.containsKey(category); } @@ -301,7 +301,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * @throws ClassCastException if category is not implementing * <code>Attribute</code>. */ - public Attribute get(Class category) + public Attribute get(Class<?> category) { if (category == null) throw new NullPointerException("category may not be null"); @@ -359,7 +359,7 @@ public class HashAttributeSet implements AttributeSet, Serializable * @return <code>true</code> if an attribute is removed, false in all other cases. * @throws UnmodifiableSetException if the set does not support modification. */ - public boolean remove(Class category) + public boolean remove(Class<?> category) { if (category == null) return false; diff --git a/libjava/classpath/javax/print/attribute/standard/Chromaticity.java b/libjava/classpath/javax/print/attribute/standard/Chromaticity.java index cc834f680a2..3dec79893b4 100644 --- a/libjava/classpath/javax/print/attribute/standard/Chromaticity.java +++ b/libjava/classpath/javax/print/attribute/standard/Chromaticity.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -94,7 +95,7 @@ public final class Chromaticity extends EnumSyntax * * @return The class <code>Chromaticity</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Chromaticity.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/ColorSupported.java b/libjava/classpath/javax/print/attribute/standard/ColorSupported.java index bca932dd735..c5e251a5044 100644 --- a/libjava/classpath/javax/print/attribute/standard/ColorSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/ColorSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -88,7 +89,7 @@ public final class ColorSupported extends EnumSyntax * * @return The class <code>ColorSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return ColorSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Compression.java b/libjava/classpath/javax/print/attribute/standard/Compression.java index 01891fe2369..f2f4f1cc142 100644 --- a/libjava/classpath/javax/print/attribute/standard/Compression.java +++ b/libjava/classpath/javax/print/attribute/standard/Compression.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; @@ -91,7 +92,7 @@ public class Compression extends EnumSyntax * * @return The class <code>Compression</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return Compression.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Copies.java b/libjava/classpath/javax/print/attribute/standard/Copies.java index 78ca6c6cc63..ea9a0990a31 100644 --- a/libjava/classpath/javax/print/attribute/standard/Copies.java +++ b/libjava/classpath/javax/print/attribute/standard/Copies.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -97,7 +98,7 @@ public final class Copies extends IntegerSyntax * * @return The class <code>Copies</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Copies.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java b/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java index fec426becd4..1f62f48a87f 100644 --- a/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/CopiesSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.SetOfIntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -112,7 +113,7 @@ public final class CopiesSupported extends SetOfIntegerSyntax * * @return The class <code>CopiesSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return CopiesSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java index 36b740ef30f..324bab73b8d 100644 --- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java +++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCompleted.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Date; +import javax.print.attribute.Attribute; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; @@ -92,7 +93,7 @@ public final class DateTimeAtCompleted extends DateTimeSyntax * * @return The class <code>DateTimeAtCompleted</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return DateTimeAtCompleted.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java index b463c40ac88..5e975b64ae7 100644 --- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java +++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtCreation.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Date; +import javax.print.attribute.Attribute; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; @@ -92,7 +93,7 @@ public final class DateTimeAtCreation extends DateTimeSyntax * * @return The class <code>DateTimeAtCreation</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return DateTimeAtCreation.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java b/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java index 42dee8048eb..b407d2b2aa0 100644 --- a/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java +++ b/libjava/classpath/javax/print/attribute/standard/DateTimeAtProcessing.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Date; +import javax.print.attribute.Attribute; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; @@ -92,7 +93,7 @@ public final class DateTimeAtProcessing extends DateTimeSyntax * * @return The class <code>DateTimeAtProcessing</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return DateTimeAtProcessing.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Destination.java b/libjava/classpath/javax/print/attribute/standard/Destination.java index 1a4e79dd8f8..a82aa4b369d 100644 --- a/libjava/classpath/javax/print/attribute/standard/Destination.java +++ b/libjava/classpath/javax/print/attribute/standard/Destination.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.net.URI; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; import javax.print.attribute.URISyntax; @@ -104,7 +105,7 @@ public final class Destination extends URISyntax * * @return The class <code>Destination</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Destination.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/DocumentName.java b/libjava/classpath/javax/print/attribute/standard/DocumentName.java index d1428ed8b79..6a377d5be70 100644 --- a/libjava/classpath/javax/print/attribute/standard/DocumentName.java +++ b/libjava/classpath/javax/print/attribute/standard/DocumentName.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.TextSyntax; @@ -98,7 +99,7 @@ public final class DocumentName extends TextSyntax * * @return The class <code>DocumentName</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return DocumentName.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Fidelity.java b/libjava/classpath/javax/print/attribute/standard/Fidelity.java index 02e292f58b4..5e25f5b882b 100644 --- a/libjava/classpath/javax/print/attribute/standard/Fidelity.java +++ b/libjava/classpath/javax/print/attribute/standard/Fidelity.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -107,7 +108,7 @@ public final class Fidelity extends EnumSyntax * * @return The class <code>Fidelity</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Fidelity.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Finishings.java b/libjava/classpath/javax/print/attribute/standard/Finishings.java index 963485e7b87..cd8f6753b30 100644 --- a/libjava/classpath/javax/print/attribute/standard/Finishings.java +++ b/libjava/classpath/javax/print/attribute/standard/Finishings.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -238,7 +239,7 @@ public class Finishings extends EnumSyntax * * @return the class <code>Finishings</code> itself */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return Finishings.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java b/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java index 768600f8065..7c137ccd171 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java +++ b/libjava/classpath/javax/print/attribute/standard/JobHoldUntil.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Date; +import javax.print.attribute.Attribute; import javax.print.attribute.DateTimeSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -98,7 +99,7 @@ public final class JobHoldUntil extends DateTimeSyntax * * @return The class <code>JobHoldUntil</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobHoldUntil.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressions.java b/libjava/classpath/javax/print/attribute/standard/JobImpressions.java index 0da3e59cf24..a2c7d4dd653 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobImpressions.java +++ b/libjava/classpath/javax/print/attribute/standard/JobImpressions.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -110,7 +111,7 @@ public final class JobImpressions extends IntegerSyntax * * @return The class <code>JobImpressions</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobImpressions.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java b/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java index 82da507a044..55d3fd6b991 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java +++ b/libjava/classpath/javax/print/attribute/standard/JobImpressionsCompleted.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -101,7 +102,7 @@ public final class JobImpressionsCompleted extends IntegerSyntax * * @return The class <code>JobImpressionsCompleted</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobImpressionsCompleted.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java index bd10457513c..5be3fc0a6f2 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/JobImpressionsSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.SetOfIntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -96,7 +97,7 @@ public final class JobImpressionsSupported extends SetOfIntegerSyntax * * @return The class <code>JobImpressionsSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobImpressionsSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctets.java b/libjava/classpath/javax/print/attribute/standard/JobKOctets.java index b380aa17ce9..ac9a7eff6ae 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobKOctets.java +++ b/libjava/classpath/javax/print/attribute/standard/JobKOctets.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -110,7 +111,7 @@ public final class JobKOctets extends IntegerSyntax * * @return The class <code>JobKOctets</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobKOctets.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java b/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java index 762369565e2..34616edfeaa 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java +++ b/libjava/classpath/javax/print/attribute/standard/JobKOctetsProcessed.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -102,7 +103,7 @@ public final class JobKOctetsProcessed extends IntegerSyntax * * @return The class <code>JobKOctetsProcessed</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobKOctetsProcessed.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java index 8a4cbfc8c16..4936fd49f72 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/JobKOctetsSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.SetOfIntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -96,7 +97,7 @@ public final class JobKOctetsSupported extends SetOfIntegerSyntax * * @return The class <code>JobKOctetsSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobKOctetsSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java index 04b83069c2a..17cf96f33b6 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java +++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheets.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -107,7 +108,7 @@ public class JobMediaSheets extends IntegerSyntax * * @return The class <code>JobMediaSheets</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobMediaSheets.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java index 85b9ab0481e..353c044ec1a 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java +++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsCompleted.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -96,7 +97,7 @@ public final class JobMediaSheetsCompleted extends IntegerSyntax * * @return The class <code>JobMediaSheetsCompleted</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobMediaSheetsCompleted.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java index cb06af6fabe..d9a0ed2dfca 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/JobMediaSheetsSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.SetOfIntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -96,7 +97,7 @@ public final class JobMediaSheetsSupported extends SetOfIntegerSyntax * * @return The class <code>JobMediaSheetsSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobMediaSheetsSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java b/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java index 8eaae357c88..f2a589af42f 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java +++ b/libjava/classpath/javax/print/attribute/standard/JobMessageFromOperator.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; @@ -95,7 +96,7 @@ public final class JobMessageFromOperator extends TextSyntax * * @return The class <code>JobMessageFromOperator</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobMessageFromOperator.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobName.java b/libjava/classpath/javax/print/attribute/standard/JobName.java index c848a63d35e..5f5310e9676 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobName.java +++ b/libjava/classpath/javax/print/attribute/standard/JobName.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; import javax.print.attribute.TextSyntax; @@ -93,7 +94,7 @@ public final class JobName extends TextSyntax * * @return The class <code>JobName</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobName.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java b/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java index 2d6e79df654..62073daa6db 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java +++ b/libjava/classpath/javax/print/attribute/standard/JobOriginatingUserName.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; @@ -92,7 +93,7 @@ public final class JobOriginatingUserName extends TextSyntax * * @return The class <code>JobOriginatingUserName</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobOriginatingUserName.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobPriority.java b/libjava/classpath/javax/print/attribute/standard/JobPriority.java index bcfb239ed9b..88fc685b8ea 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobPriority.java +++ b/libjava/classpath/javax/print/attribute/standard/JobPriority.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -97,7 +98,7 @@ public final class JobPriority extends IntegerSyntax * * @return The class <code>JobPriority</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobPriority.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java b/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java index 0db7107b304..e7ebca2db73 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java +++ b/libjava/classpath/javax/print/attribute/standard/JobPrioritySupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -99,7 +100,7 @@ public final class JobPrioritySupported extends IntegerSyntax * * @return The class <code>JobPrioritySupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobPrioritySupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobSheets.java b/libjava/classpath/javax/print/attribute/standard/JobSheets.java index f2cfacc9ecd..a930f63cf50 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobSheets.java +++ b/libjava/classpath/javax/print/attribute/standard/JobSheets.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -88,7 +89,7 @@ public class JobSheets extends EnumSyntax * * @return The class <code>JobSheets</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobSheets.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobState.java b/libjava/classpath/javax/print/attribute/standard/JobState.java index 8289569c35c..fa769bbf33d 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobState.java +++ b/libjava/classpath/javax/print/attribute/standard/JobState.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -137,7 +138,7 @@ public class JobState extends EnumSyntax * * @return The class <code>JobState</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobState.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobStateReason.java b/libjava/classpath/javax/print/attribute/standard/JobStateReason.java index 967a6bf2e53..b8420b18012 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobStateReason.java +++ b/libjava/classpath/javax/print/attribute/standard/JobStateReason.java @@ -262,7 +262,7 @@ public class JobStateReason extends EnumSyntax * * @return The class <code>JobStateReason</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobStateReason.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java b/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java index 32f942b6bd7..997dcbc3779 100644 --- a/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java +++ b/libjava/classpath/javax/print/attribute/standard/JobStateReasons.java @@ -42,6 +42,7 @@ import java.util.Collection; import java.util.HashSet; import java.util.Iterator; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; /** @@ -56,7 +57,7 @@ import javax.print.attribute.PrintJobAttribute; * @author Michael Koch (konqueror@gmx.de) * @author Wolfgang Baer (WBaer@gmx.de) */ -public final class JobStateReasons extends HashSet +public final class JobStateReasons extends HashSet<JobStateReason> implements PrintJobAttribute { private static final long serialVersionUID = 8849088261264331812L; @@ -108,12 +109,11 @@ public final class JobStateReasons extends HashSet * @throws ClassCastException if values of collection are not of type * <code>JobStateReason</code>. */ - public JobStateReasons(Collection collection) + public JobStateReasons(Collection<JobStateReason> collection) { super(collection.size(), 0.75f); - Iterator it = collection.iterator(); - while (it.hasNext()) - add(it.next()); + for (JobStateReason reason : collection) + add(reason); } /** @@ -126,12 +126,12 @@ public final class JobStateReasons extends HashSet * @throws ClassCastException if given object is not an instance of * <code>JobStateReason</code>. */ - public boolean add(Object o) + public boolean add(JobStateReason o) { if (o == null) throw new NullPointerException("reason is null"); - return super.add((JobStateReason) o); + return add(o); } /** @@ -139,7 +139,7 @@ public final class JobStateReasons extends HashSet * * @return The class <code>JobStateReasons</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return JobStateReasons.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Media.java b/libjava/classpath/javax/print/attribute/standard/Media.java index 37132e72706..4c0af0ed11b 100644 --- a/libjava/classpath/javax/print/attribute/standard/Media.java +++ b/libjava/classpath/javax/print/attribute/standard/Media.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -105,7 +106,7 @@ public abstract class Media extends EnumSyntax * * @return The class <code>Media</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return Media.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java b/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java index e0366f589ad..84ebd61ce87 100644 --- a/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java +++ b/libjava/classpath/javax/print/attribute/standard/MediaPrintableArea.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -152,7 +153,7 @@ public final class MediaPrintableArea * * @return The class <code>MediaPrintableArea</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return MediaPrintableArea.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/MediaSize.java b/libjava/classpath/javax/print/attribute/standard/MediaSize.java index 982b5c5ef7b..be3f1567812 100644 --- a/libjava/classpath/javax/print/attribute/standard/MediaSize.java +++ b/libjava/classpath/javax/print/attribute/standard/MediaSize.java @@ -66,13 +66,13 @@ public class MediaSize extends Size2DSyntax implements Attribute { private static final long serialVersionUID = -1967958664615414771L; - - private static ArrayList mediaCache; + + private static ArrayList<MediaSize> mediaCache; static { - mediaCache = new ArrayList(); - + mediaCache = new ArrayList<MediaSize>(); + // We call one instance of every container class to make sure it gets // loaded during class initialization and therefore all other static // fields of this container class also. @@ -86,7 +86,7 @@ public class MediaSize extends Size2DSyntax tmp = MediaSize.NA.LEGAL; tmp = MediaSize.Other.EXECUTIVE; } - + private MediaSizeName mediaName; /** @@ -180,10 +180,11 @@ public class MediaSize extends Size2DSyntax * * @return The class <code>MediaSize</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return MediaSize.class; } + /** * Searches for a MediaSize object with the given dimensions. @@ -201,7 +202,7 @@ public class MediaSize extends Size2DSyntax if (x <= 0.0f || y <= 0.0f) throw new IllegalArgumentException( "x and/or y may not be less or equal 0"); - + if (units < 1) throw new IllegalArgumentException("units may not be less then 1"); diff --git a/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java b/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java index 1a89fd01aef..3ee1b4126e7 100644 --- a/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java +++ b/libjava/classpath/javax/print/attribute/standard/MultipleDocumentHandling.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -108,7 +109,7 @@ public class MultipleDocumentHandling extends EnumSyntax * * @return The class <code>MultipleDocumentHandling</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return MultipleDocumentHandling.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java b/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java index b9363eb9101..1121a1f0f79 100644 --- a/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java +++ b/libjava/classpath/javax/print/attribute/standard/NumberOfDocuments.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -90,7 +91,7 @@ public final class NumberOfDocuments extends IntegerSyntax * * @return The class <code>NumberOfDocuments</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return NumberOfDocuments.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java b/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java index d3c0952fcae..b968f9a7bf1 100644 --- a/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java +++ b/libjava/classpath/javax/print/attribute/standard/NumberOfInterveningJobs.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -91,7 +92,7 @@ public final class NumberOfInterveningJobs extends IntegerSyntax * * @return The class <code>NumberOfInterveningJobs</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return NumberOfInterveningJobs.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/NumberUp.java b/libjava/classpath/javax/print/attribute/standard/NumberUp.java index aa2324040af..219a1c1a8b7 100644 --- a/libjava/classpath/javax/print/attribute/standard/NumberUp.java +++ b/libjava/classpath/javax/print/attribute/standard/NumberUp.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintJobAttribute; @@ -95,7 +96,7 @@ public final class NumberUp extends IntegerSyntax * * @return The class <code>NumberUp</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return NumberUp.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java b/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java index 71392a9ef52..20bd9c93b59 100644 --- a/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/NumberUpSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.SetOfIntegerSyntax; import javax.print.attribute.SupportedValuesAttribute; @@ -128,7 +129,7 @@ public final class NumberUpSupported extends SetOfIntegerSyntax * * @return The class <code>NumberUpSupported</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return NumberUpSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java b/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java index 1f9f0bf6f7e..8d346855664 100644 --- a/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java +++ b/libjava/classpath/javax/print/attribute/standard/OrientationRequested.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -112,7 +113,7 @@ public final class OrientationRequested extends EnumSyntax * * @return The class <code>OrientationRequested</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return OrientationRequested.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java b/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java index 917064f5446..df8a5453f15 100644 --- a/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java +++ b/libjava/classpath/javax/print/attribute/standard/OutputDeviceAssigned.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.TextSyntax; @@ -98,7 +99,7 @@ public final class OutputDeviceAssigned extends TextSyntax * * @return The class <code>OutputDeviceAssigned</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return OutputDeviceAssigned.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java b/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java index ee07edb1af5..02c9c198c0b 100644 --- a/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/PDLOverrideSupported.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -91,7 +92,7 @@ public class PDLOverrideSupported extends EnumSyntax * * @return The class <code>PDLOverrideSupported</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return PDLOverrideSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PageRanges.java b/libjava/classpath/javax/print/attribute/standard/PageRanges.java index 3aa1b562549..9637a917f89 100644 --- a/libjava/classpath/javax/print/attribute/standard/PageRanges.java +++ b/libjava/classpath/javax/print/attribute/standard/PageRanges.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -154,7 +155,7 @@ public final class PageRanges extends SetOfIntegerSyntax * * @return The class <code>PageRanges</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PageRanges.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java b/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java index c06fb9746af..6305842c010 100644 --- a/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java +++ b/libjava/classpath/javax/print/attribute/standard/PagesPerMinute.java @@ -38,6 +38,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -92,7 +93,7 @@ public final class PagesPerMinute extends IntegerSyntax * * @return The class <code>PagesPerMinute</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PagesPerMinute.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java b/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java index 80a397e6381..3d5fa2ca559 100644 --- a/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java +++ b/libjava/classpath/javax/print/attribute/standard/PagesPerMinuteColor.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -91,7 +92,7 @@ public final class PagesPerMinuteColor extends IntegerSyntax * * @return The class <code>PagesPerMinuteColor</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PagesPerMinuteColor.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java b/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java index 3a479abfac4..14d560533a6 100644 --- a/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java +++ b/libjava/classpath/javax/print/attribute/standard/PresentationDirection.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -138,7 +139,7 @@ public final class PresentationDirection extends EnumSyntax * * @return The class <code>PresentationDirection</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PresentationDirection.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrintQuality.java b/libjava/classpath/javax/print/attribute/standard/PrintQuality.java index c581d5f9dbe..bc94d532b8b 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrintQuality.java +++ b/libjava/classpath/javax/print/attribute/standard/PrintQuality.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -92,7 +93,7 @@ public class PrintQuality extends EnumSyntax * * @return The class <code>PrintQuality</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrintQuality.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java b/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java index 2cd496cf0c7..e287f8ce9e1 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterInfo.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; @@ -92,7 +93,7 @@ public final class PrinterInfo extends TextSyntax * * @return The class <code>PrinterInfo</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterInfo.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java b/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java index 96dbc57ce32..1c9c3993029 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterIsAcceptingJobs.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -93,7 +94,7 @@ public final class PrinterIsAcceptingJobs extends EnumSyntax * * @return The class <code>PrinterIsAcceptingJobs</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterIsAcceptingJobs.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java b/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java index 35b61e4e5d1..7a446adcb99 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterLocation.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; @@ -92,7 +93,7 @@ public final class PrinterLocation extends TextSyntax * * @return The class <code>PrinterLocation</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterLocation.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java b/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java index 7010746a522..77fd84b4a5b 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterMakeAndModel.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; @@ -92,7 +93,7 @@ public final class PrinterMakeAndModel extends TextSyntax * * @return The class <code>PrinterMakeAndModel</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterMakeAndModel.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java b/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java index b4f5d88bd45..55bc7406a0e 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterMessageFromOperator.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; @@ -95,7 +96,7 @@ public final class PrinterMessageFromOperator extends TextSyntax * * @return The class <code>PrinterMessageFromOperator</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterMessageFromOperator.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java index 28abd4e3fb6..de330fe0bfa 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfo.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.net.URI; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.URISyntax; @@ -94,7 +95,7 @@ public final class PrinterMoreInfo extends URISyntax * * @return The class <code>PrinterMoreInfo</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterMoreInfo.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java index df0232e167d..73a627eb308 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterMoreInfoManufacturer.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.net.URI; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.URISyntax; @@ -98,7 +99,7 @@ public final class PrinterMoreInfoManufacturer extends URISyntax * * @return The class <code>PrinterMoreInfoManufacturer</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterMoreInfoManufacturer.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterName.java b/libjava/classpath/javax/print/attribute/standard/PrinterName.java index 5b7da605969..b084c2c0fd4 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterName.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterName.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.TextSyntax; @@ -94,7 +95,7 @@ public final class PrinterName extends TextSyntax * * @return The class <code>PrinterName</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterName.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java b/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java index f4cde0f5e72..7b60a0cada4 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterResolution.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.PrintJobAttribute; import javax.print.attribute.PrintRequestAttribute; @@ -95,7 +96,7 @@ public final class PrinterResolution extends ResolutionSyntax * * @return The class <code>PrinterResolution</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterResolution.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterState.java b/libjava/classpath/javax/print/attribute/standard/PrinterState.java index 6fd4c3f4643..4b85c01896f 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterState.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterState.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -108,7 +109,7 @@ public final class PrinterState extends EnumSyntax * * @return The class <code>PrinterState</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterState.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java index 340bfbabf51..1abb7c6aa3e 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterStateReason.java @@ -293,7 +293,7 @@ public class PrinterStateReason extends EnumSyntax * * @return The class <code>PrintStateReason</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterStateReason.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java b/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java index 40c6f1b7151..c58dd53795e 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterStateReasons.java @@ -45,6 +45,7 @@ import java.util.Iterator; import java.util.Map; import java.util.Set; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; /** @@ -68,7 +69,8 @@ import javax.print.attribute.PrintServiceAttribute; * @author Michael Koch (konqueror@gmx.de) * @author Wolfgang Baer (WBaer@gmx.de) */ -public final class PrinterStateReasons extends HashMap +public final class PrinterStateReasons + extends HashMap<PrinterStateReason, Severity> implements PrintServiceAttribute { private static final long serialVersionUID = -3731791085163619457L; @@ -121,13 +123,11 @@ public final class PrinterStateReasons extends HashMap * <code>PrinterStateReason</code> and keys are not of type * <code>Severity</code>. */ - public PrinterStateReasons(Map map) + public PrinterStateReasons(Map<PrinterStateReason,Severity> map) { super(map.size(), 0.75f); - Iterator it = map.entrySet().iterator(); - while (it.hasNext()) + for (Map.Entry<PrinterStateReason,Severity> entry : map.entrySet()) { - Map.Entry entry = (Map.Entry) it.next(); put(entry.getKey(), entry.getValue()); } } @@ -139,7 +139,7 @@ public final class PrinterStateReasons extends HashMap * @param severity the severity level for the constructed set. * @return The set of printer state reasons. */ - public Set printerStateReasonSet(Severity severity) + public Set<PrinterStateReason> printerStateReasonSet(Severity severity) { if (severity == null) throw new NullPointerException("severity is null"); @@ -171,7 +171,7 @@ public final class PrinterStateReasons extends HashMap * <code>PrinterStateReason</code> and severity is not a * <code>Severity</code> instance. */ - public Object put(Object reason, Object severity) + public Severity put(PrinterStateReason reason,Severity severity) { if (reason == null) throw new NullPointerException("reason is null"); @@ -186,7 +186,7 @@ public final class PrinterStateReasons extends HashMap * * @return The class <code>PrintStateReasons</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterStateReasons.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/PrinterURI.java b/libjava/classpath/javax/print/attribute/standard/PrinterURI.java index 0deca90bed2..017e6b85a39 100644 --- a/libjava/classpath/javax/print/attribute/standard/PrinterURI.java +++ b/libjava/classpath/javax/print/attribute/standard/PrinterURI.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.net.URI; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintServiceAttribute; import javax.print.attribute.URISyntax; @@ -94,7 +95,7 @@ public final class PrinterURI extends URISyntax * * @return The class <code>PrinterURI</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return PrinterURI.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java b/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java index 8ff46a95459..d024b3dcc97 100644 --- a/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java +++ b/libjava/classpath/javax/print/attribute/standard/QueuedJobCount.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.IntegerSyntax; import javax.print.attribute.PrintServiceAttribute; @@ -93,7 +94,7 @@ public final class QueuedJobCount extends IntegerSyntax * * @return The class <code>QueuedJobCount</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return QueuedJobCount.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java b/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java index aeccaac5b5a..9d2354bd6ba 100644 --- a/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java +++ b/libjava/classpath/javax/print/attribute/standard/ReferenceUriSchemesSupported.java @@ -128,7 +128,7 @@ public class ReferenceUriSchemesSupported extends EnumSyntax * * @return The class <code>ReferenceUriSchemesSupported</code> itself. */ - public final Class getCategory() + public Class< ? extends Attribute> getCategory() { return ReferenceUriSchemesSupported.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java b/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java index 8b947036c45..b7b85abbdaa 100644 --- a/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java +++ b/libjava/classpath/javax/print/attribute/standard/RequestingUserName.java @@ -40,6 +40,7 @@ package javax.print.attribute.standard; import java.util.Locale; +import javax.print.attribute.Attribute; import javax.print.attribute.PrintRequestAttribute; import javax.print.attribute.TextSyntax; @@ -92,7 +93,7 @@ public final class RequestingUserName extends TextSyntax * * @return The class <code>RequestingUserName</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return RequestingUserName.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Severity.java b/libjava/classpath/javax/print/attribute/standard/Severity.java index 5569816de8e..019c8c6fcbb 100644 --- a/libjava/classpath/javax/print/attribute/standard/Severity.java +++ b/libjava/classpath/javax/print/attribute/standard/Severity.java @@ -97,7 +97,7 @@ public final class Severity extends EnumSyntax * * @return The class <code>Severity</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Severity.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/SheetCollate.java b/libjava/classpath/javax/print/attribute/standard/SheetCollate.java index 5343bc6df1b..886b8d6c921 100644 --- a/libjava/classpath/javax/print/attribute/standard/SheetCollate.java +++ b/libjava/classpath/javax/print/attribute/standard/SheetCollate.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -97,7 +98,7 @@ public final class SheetCollate extends EnumSyntax * * @return The class <code>SheetCollate</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return SheetCollate.class; } diff --git a/libjava/classpath/javax/print/attribute/standard/Sides.java b/libjava/classpath/javax/print/attribute/standard/Sides.java index 816365aedea..02fe4a1e5d1 100644 --- a/libjava/classpath/javax/print/attribute/standard/Sides.java +++ b/libjava/classpath/javax/print/attribute/standard/Sides.java @@ -37,6 +37,7 @@ exception statement from your version. */ package javax.print.attribute.standard; +import javax.print.attribute.Attribute; import javax.print.attribute.DocAttribute; import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; @@ -108,7 +109,7 @@ public final class Sides extends EnumSyntax * * @return The class <code>Sides</code> itself. */ - public Class getCategory() + public Class< ? extends Attribute> getCategory() { return Sides.class; } |