所有类
javax.print.attribute.standard
类 PrinterLocation
java.lang.Object
javax.print.attribute.TextSyntax
javax.print.attribute.standard.PrinterLocation
- 所有已实现的接口:
- Serializable, Cloneable, Attribute, PrintServiceAttribute
public final class PrinterLocation
- extends TextSyntax
- implements PrintServiceAttribute
类 PrinterLocation 是打印属性类,它是一种文本属性,标识了设备的位置。这包括类似于下面的信息:"in Room 123A, second floor of building XYZ"
。
IPP 兼容性:字符串值提供了 IPP 名称值。语言环境提供了 IPP 自然语言。由 getName()
返回的类别名称提供了 IPP 属性名称。
- 另请参见:
- 序列化表格
PrinterLocation
public PrinterLocation(String location,
Locale locale)
- 构造具有给定位置和语言环境的新 PrinterLocation 属性。
- 参数:
location
- 打印机位置。 locale
- 文本字符串的自然语言。将 null 解释为默认的语言环境,这是 Locale.getDefault()
返回的语言环语。 - 抛出:
NullPointerException(未检查的异常)如果
- location
为 null。
equals
public boolean equals(Object object)
- 返回此 PrinterLocation 属性是否等效于传入的对象。若要等效,以下所有条件都必须为 true:
object
不为 null。object
是类 PrinterLocation 的一个实例。- 此 PrinterLocation 属性的基础字符串和
object
的基础字符串相等。 - 此 PrinterLocation 属性的语言环境和
object
的语言环境相等。
- 覆盖:
- 类
TextSyntax
中的 equals
- 参数:
object
- 要比较的对象。 - 返回:
- 如果
object
等效于此 PrinterLocation 属性,则返回 True,否则返回 false。 - 另请参见:
Object.hashCode()
, Hashtable
getCategory
public final Class<? extends Attribute> getCategory()
- 获取将用作此打印属性值的“类别”的打印属性类。
对于类 PrinterLocation,该类别就是类 PrinterLocation 本身。
- 指定者:
- 接口
Attribute
中的 getCategory
- 返回:
- 打印属性类(类别),这是类
java.lang.Class
的一个实例。
getName
public final String getName()
- 获取类别的名称,此属性值是该类别的一个实例。
对于类 PrinterLocation,类别名称是 "printer-location"
。
- 指定者:
- 接口
Attribute
中的 getName
- 返回:
- 属性类别名称。
所有类