--- old/src/java.desktop/share/classes/javax/print/attribute/standard/Sides.java 2017-07-16 16:18:36.000000000 -0700 +++ new/src/java.desktop/share/classes/javax/print/attribute/standard/Sides.java 2017-07-16 16:18:36.000000000 -0700 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,104 +22,96 @@ * or visit www.oracle.com if you need additional information or have any * questions. */ + package javax.print.attribute.standard; import javax.print.attribute.Attribute; -import javax.print.attribute.EnumSyntax; import javax.print.attribute.DocAttribute; -import javax.print.attribute.PrintRequestAttribute; +import javax.print.attribute.EnumSyntax; import javax.print.attribute.PrintJobAttribute; +import javax.print.attribute.PrintRequestAttribute; /** - * Class Sides is a printing attribute class, an enumeration, that specifies - * how print-stream pages are to be imposed upon the sides of an instance of a - * selected medium, i.e., an impression. - *

- * The effect of a Sides attribute on a multidoc print job (a job with multiple - * documents) depends on whether all the docs have the same sides values - * specified or whether different docs have different sides values specified, - * and on the (perhaps defaulted) value of the {@link MultipleDocumentHandling - * MultipleDocumentHandling} attribute. - *

- *

- * IPP Compatibility: The category name returned by - * {@code getName()} is the IPP attribute name. The enumeration's - * integer value is the IPP enum value. The {@code toString()} method - * returns the IPP string representation of the attribute value. - * - * @author Alan Kaminsky + * @author Alan Kaminsky */ - public final class Sides extends EnumSyntax implements DocAttribute, PrintRequestAttribute, PrintJobAttribute { + /** + * Use serialVersionUID from JDK 1.4 for interoperability. + */ private static final long serialVersionUID = -6890309414893262822L; /** @@ -130,49 +122,55 @@ /** * Imposes each consecutive pair of print-stream pages upon front and back - * sides of consecutive media sheets, such that the orientation of each - * pair of print-stream pages on the medium would be correct for the - * reader as if for binding on the long edge. This imposition is also - * known as "duplex" (see {@link #DUPLEX DUPLEX}). + * sides of consecutive media sheets, such that the orientation of each pair + * of print-stream pages on the medium would be correct for the reader as if + * for binding on the long edge. This imposition is also known as "duplex" + * (see {@link #DUPLEX DUPLEX}). */ public static final Sides TWO_SIDED_LONG_EDGE = new Sides(1); /** * Imposes each consecutive pair of print-stream pages upon front and back - * sides of consecutive media sheets, such that the orientation of each - * pair of print-stream pages on the medium would be correct for the - * reader as if for binding on the short edge. This imposition is also - * known as "tumble" (see {@link #TUMBLE TUMBLE}). + * sides of consecutive media sheets, such that the orientation of each pair + * of print-stream pages on the medium would be correct for the reader as if + * for binding on the short edge. This imposition is also known as "tumble" + * (see {@link #TUMBLE TUMBLE}). */ public static final Sides TWO_SIDED_SHORT_EDGE = new Sides(2); /** - * An alias for "two sided long edge" (see {@link #TWO_SIDED_LONG_EDGE - * TWO_SIDED_LONG_EDGE}). + * An alias for "two sided long edge" (see + * {@link #TWO_SIDED_LONG_EDGE TWO_SIDED_LONG_EDGE}). */ public static final Sides DUPLEX = TWO_SIDED_LONG_EDGE; /** - * An alias for "two sided short edge" (see {@link #TWO_SIDED_SHORT_EDGE - * TWO_SIDED_SHORT_EDGE}). + * An alias for "two sided short edge" (see + * {@link #TWO_SIDED_SHORT_EDGE TWO_SIDED_SHORT_EDGE}). */ public static final Sides TUMBLE = TWO_SIDED_SHORT_EDGE; /** * Construct a new sides enumeration value with the given integer value. * - * @param value Integer value. + * @param value Integer value */ protected Sides(int value) { super (value); } + /** + * The string table for class {@code Sides}. + */ private static final String[] myStringTable = { "one-sided", "two-sided-long-edge", "two-sided-short-edge" }; + /** + * The enumeration value table for class {@code Sides}. + */ private static final Sides[] myEnumValueTable = { ONE_SIDED, TWO_SIDED_LONG_EDGE, @@ -180,14 +178,14 @@ }; /** - * Returns the string table for class Sides. + * Returns the string table for class {@code Sides}. */ protected String[] getStringTable() { return myStringTable; } /** - * Returns the enumeration value table for class Sides. + * Returns the enumeration value table for class {@code Sides}. */ protected EnumSyntax[] getEnumValueTable() { return myEnumValueTable; @@ -196,11 +194,11 @@ /** * Get the printing attribute class which is to be used as the "category" * for this printing attribute value. - *

- * For class Sides, the category is class Sides itself. + *

+ * For class {@code Sides}, the category is class {@code Sides} itself. * - * @return Printing attribute class (category), an instance of class - * {@link java.lang.Class java.lang.Class}. + * @return printing attribute class (category), an instance of class + * {@link Class java.lang.Class} */ public final Class getCategory() { return Sides.class; @@ -209,13 +207,12 @@ /** * Get the name of the category of which this attribute value is an * instance. - *

- * For class Sides, the category name is {@code "sides"}. + *

+ * For class {@code Sides}, the category name is {@code "sides"}. * - * @return Attribute category name. + * @return attribute category name */ public final String getName() { return "sides"; } - }