1 7 package javax.print.attribute.standard; 8 9 import javax.print.attribute.Attribute ; 10 import javax.print.attribute.SetOfIntegerSyntax ; 11 import javax.print.attribute.SupportedValuesAttribute ; 12 13 29 public final class CopiesSupported extends SetOfIntegerSyntax 30 implements SupportedValuesAttribute { 31 32 private static final long serialVersionUID = 6927711687034846001L; 33 34 43 public CopiesSupported(int member) { 44 super (member); 45 if (member < 1) { 46 throw new IllegalArgumentException ("Copies value < 1 specified"); 47 } 48 } 49 50 63 public CopiesSupported(int lowerBound, int upperBound) { 64 super(lowerBound, upperBound); 65 66 if (lowerBound > upperBound) { 67 throw new IllegalArgumentException ("Null range specified"); 68 } else if (lowerBound < 1) { 69 throw new IllegalArgumentException ("Copies value < 1 specified"); 70 } 71 } 72 73 92 public boolean equals(Object object) { 93 return super.equals (object) && object instanceof CopiesSupported ; 94 } 95 96 106 public final Class <? extends Attribute > getCategory() { 107 return CopiesSupported .class; 108 } 109 110 119 public final String getName() { 120 return "copies-supported"; 121 } 122 123 } 124 | Popular Tags |