public interface Name extends CharSequence
Name对象相同的实现收藏可用而从不同的实现可能不会正常工作
Names收藏。
一个空的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, toStringboolean 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.