public static final class PageAttributes.ColorType extends Object
Modifier and Type | Field and Description |
---|---|
static PageAttributes.ColorType |
COLOR
用于指定彩色打印的ColorType实例。
|
static PageAttributes.ColorType |
MONOCHROME
用于指定单色打印的ColorType实例。
|
public static final PageAttributes.ColorType COLOR
public static final PageAttributes.ColorType MONOCHROME
public int hashCode()
Object
HashMap
提供的那样 。
hashCode
的总合同是:
hashCode
方法必须始终返回相同的整数,前提是修改对象中equals
比较中的信息。 该整数不需要从一个应用程序的执行到相同应用程序的另一个执行保持一致。 equals(Object)
方法两个对象相等,则在两个对象中的每个对象上调用hashCode
方法必须产生相同的整数结果。 Object.equals(java.lang.Object)
方法不相等,则在两个对象中的每个对象上调用hashCode
方法必须产生不同的整数结果。 但是,程序员应该意识到,为不等对象生成不同的整数结果可能会提高哈希表的性能。 尽可能合理实用,由类别Object
定义的hashCode方法为不同的对象返回不同的整数。 (这通常通过将对象的内部地址转换为整数来实现,但Java的编程语言不需要此实现技术。)
hashCode
在类别
Object
Object.equals(java.lang.Object)
,
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.