public final class TransformAttribute extends Object implements Serializable
TransformAttribute
类提供的变换,它是安全的使用作为一个属性不变的包装。
Modifier and Type | Field and Description |
---|---|
static TransformAttribute |
IDENTITY
一个
TransformAttribute 代表身份变换。
|
Constructor and Description |
---|
TransformAttribute(AffineTransform transform)
指定指定的变换。
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object rhs)
如果返回
true RHS是
TransformAttribute 的变换等于这
TransformAttribute 变换。
|
AffineTransform |
getTransform()
返回包变换的副本。
|
int |
hashCode()
返回一个对象的哈希代码值。
|
boolean |
isIdentity()
返回
true 如果包变换身份变换。
|
public static final TransformAttribute IDENTITY
TransformAttribute
代表身份变换。
public TransformAttribute(AffineTransform transform)
IDENTITY
)
transform
-指定
AffineTransform
被包裹,或空。
public AffineTransform getTransform()
AffineTransform
是一份包裹这
TransformAttribute
变换。
public boolean isIdentity()
true
如果包变换身份变换。
true
如果包变换身份变换;
false
否则。
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)
public boolean equals(Object rhs)
true
RHS是
TransformAttribute
的变换等于这
TransformAttribute
变换。
equals
方法重写,继承类
Object
rhs
-对象比较
true
如果参数是一个
TransformAttribute
的变换等于这
TransformAttribute
变换。
Object.hashCode()
,
HashMap
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.