public interface Name extends CharSequence
Name
对象相同的实现收藏可用而从不同的实现可能不会正常工作
Name
s收藏。
一个空的Name
长度为零。
在annotation processing的背景下,保证“同一”的实施必须包括语境中的API mediated processors副作用可能相互可见,包括连续标注处理rounds。
Elements.getName(java.lang.CharSequence)
Modifier and Type | Method and Description |
---|---|
boolean |
contentEquals(CharSequence cs)
比较这名指定的
CharSequence 。
|
boolean |
equals(Object obj)
返回
true 如果参数是相同的名称,否则
this ,
false 。
|
int |
hashCode()
遵循
Object.hashCode 一般合同。
|
charAt, chars, codePoints, length, subSequence, toString
boolean equals(Object obj)
true
如果参数是相同的名称,否则
this
,
false
。
注意,一个Name
身份是一个功能在一个字符序列的内容以及它的实施创造了它。
equals
方法重写,继承类
Object
obj
将这个元素比较的对象
true
指定对象是否表示相同的名称作为这
Element.equals(java.lang.Object)
int hashCode()
Object.hashCode
一般合同。
hashCode
方法重写,继承类
Object
equals(java.lang.Object)
boolean contentEquals(CharSequence cs)
CharSequence
。其结果是
true
当且仅当这个名字代表
char
值相同的序列指定的序列。
cs
序列的比较这个名字对
true
如果这个名字代表
char
值相同的序列指定的序列,
false
否则
String.contentEquals(CharSequence)
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.