APIdia Launch Partner
Top Inners Fields Constructors Methods
sun.print

pack-priv Class CustomMediaSizeName

extends MediaSizeName
Class Inheritance
Imports
java.io.Serial, java.util.ArrayList, .Map, .HashMap, .Objects, javax.print.attribute.EnumSyntax, .Size2DSyntax, javax.print.attribute.standard.Media, .MediaSize, .MediaSizeName

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private String
private static ArrayList<MediaSizeName>
private static Map<CustomMediaSizeName.SizeNameChoiceItem, CustomMediaSizeName>
private static ArrayList<String>
private MediaSizeName
private static final long
serialVersionUID

Hides javax.print.attribute.standard.MediaSizeName.serialVersionUID.

Use serialVersionUID from JDK 1.5 for interoperability.
Inherited from javax.print.attribute.standard.MediaSizeName:
ABCDEEXECUTIVEFOLIOINVOICEISO_A0ISO_A1ISO_A10ISO_A2ISO_A3ISO_A4ISO_A5ISO_A6ISO_A7ISO_A8ISO_A9ISO_B0ISO_B1ISO_B10ISO_B2ISO_B3ISO_B4ISO_B5ISO_B6ISO_B7ISO_B8ISO_B9ISO_C0ISO_C1ISO_C2ISO_C3ISO_C4ISO_C5ISO_C6ISO_DESIGNATED_LONGITALY_ENVELOPEJAPANESE_DOUBLE_POSTCARDJAPANESE_POSTCARDJIS_B0JIS_B1JIS_B10JIS_B2JIS_B3JIS_B4JIS_B5JIS_B6JIS_B7JIS_B8JIS_B9LEDGERMONARCH_ENVELOPENA_10X13_ENVELOPENA_10X14_ENVELOPENA_10X15_ENVELOPENA_5X7NA_6X9_ENVELOPENA_7X9_ENVELOPENA_8X10NA_9X11_ENVELOPENA_9X12_ENVELOPENA_LEGALNA_LETTERNA_NUMBER_10_ENVELOPENA_NUMBER_11_ENVELOPENA_NUMBER_12_ENVELOPENA_NUMBER_14_ENVELOPENA_NUMBER_9_ENVELOPEPERSONAL_ENVELOPEQUARTOTABLOID

Constructor Summary

AccessConstructor and Description
private
public
public
CustomMediaSizeName(String name, String choice, float width, float length)

Method Summary

Modifier and TypeMethod and Description
public static CustomMediaSizeName
create(String name, String choice, float width, float length)

public static MediaSizeName
findMedia(Media[] media, float x, float y, int units)

Returns closest matching MediaSizeName among given array of Media

public String
getChoiceName()

Returns the command string for this media.

protected EnumSyntax[]
getEnumValueTable()

Overrides javax.print.attribute.standard.MediaSizeName.getEnumValueTable.

Returns the enumeration value table for class CustomMediaSizeName.

public MediaSizeName
getStandardMedia()

Returns matching standard MediaSizeName.

protected String[]
getStringTable()

Overrides javax.print.attribute.standard.MediaSizeName.getStringTable.

Returns the string table for class CustomMediaSizeName.

public Media[]
getSuperEnumTable()

Returns the string table for super class MediaSizeName.

private static synchronized int

Field Detail

choiceNameback to summary
private String choiceName
customEnumTableback to summary
private static ArrayList<MediaSizeName> customEnumTable
customMapback to summary
private static Map<CustomMediaSizeName.SizeNameChoiceItem, CustomMediaSizeName> customMap
customStringTableback to summary
private static ArrayList<String> customStringTable
mediaNameback to summary
private MediaSizeName mediaName
serialVersionUIDback to summary
private static final long serialVersionUID

Hides javax.print.attribute.standard.MediaSizeName.serialVersionUID.

Use serialVersionUID from JDK 1.5 for interoperability.

Annotations
@Serial

Constructor Detail

CustomMediaSizeNameback to summary
private CustomMediaSizeName(int x)
CustomMediaSizeNameback to summary
public CustomMediaSizeName(String name)
CustomMediaSizeNameback to summary
public CustomMediaSizeName(String name, String choice, float width, float length)

Method Detail

createback to summary
public static CustomMediaSizeName create(String name, String choice, float width, float length)
findMediaback to summary
public static MediaSizeName findMedia(Media[] media, float x, float y, int units)

Returns closest matching MediaSizeName among given array of Media

getChoiceNameback to summary
public String getChoiceName()

Returns the command string for this media.

getEnumValueTableback to summary
protected EnumSyntax[] getEnumValueTable()

Overrides javax.print.attribute.standard.MediaSizeName.getEnumValueTable.

Returns the enumeration value table for class CustomMediaSizeName.

getStandardMediaback to summary
public MediaSizeName getStandardMedia()

Returns matching standard MediaSizeName.

getStringTableback to summary
protected String[] getStringTable()

Overrides javax.print.attribute.standard.MediaSizeName.getStringTable.

Returns the string table for class CustomMediaSizeName.

getSuperEnumTableback to summary
public Media[] getSuperEnumTable()

Returns the string table for super class MediaSizeName.

nextValueback to summary
private static synchronized int nextValue(String name)
sun.print back to summary

private Class CustomMediaSizeName.SizeNameChoiceItem

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final String
private final float
private final String
private final float

Constructor Summary

AccessConstructor and Description
public
SizeNameChoiceItem(String name, String choice, float width, float length)

Method Summary

Modifier and TypeMethod and Description
public boolean
equals(Object object)

Overrides java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

public int
hashCode()

Overrides java.lang.Object.hashCode.

Returns a hash code value for this object.

Inherited from java.lang.Object:
clonefinalizegetClassnotifynotifyAlltoStringwaitwaitwait

Field Detail

choiceback to summary
private final String choice
lengthback to summary
private final float length
nameback to summary
private final String name
widthback to summary
private final float width

Constructor Detail

SizeNameChoiceItemback to summary
public SizeNameChoiceItem(String name, String choice, float width, float length)

Method Detail

equalsback to summary
public boolean equals(Object object)

Overrides java.lang.Object.equals.

Doc from java.lang.Object.equals.

Indicates whether some other object is "equal to" this one.

The equals method implements an equivalence relation on non-null object references:

  • It is reflexive: for any non-null reference value x, x.equals(x) should return true.
  • It is symmetric: for any non-null reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true.
  • It is transitive: for any non-null reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true.
  • It is consistent: for any non-null reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the objects is modified.
  • For any non-null reference value x, x.equals(null) should return false.

An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.

hashCodeback to summary
public int hashCode()

Overrides java.lang.Object.hashCode.

Doc from java.lang.Object.hashCode.

Returns a hash code value for this object. This method is supported for the benefit of hash tables such as those provided by java.util.HashMap.

The general contract of hashCode is:

  • Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application.
  • If two objects are equal according to the equals method, then calling the hashCode method on each of the two objects must produce the same integer result.
  • It is not required that if two objects are unequal according to the equals method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hash tables.