本文整理了Java中com.android.dx.rop.annotation.NameValuePair.compareTo()
方法的一些代码示例,展示了NameValuePair.compareTo()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。NameValuePair.compareTo()
方法的具体详情如下:
包路径:com.android.dx.rop.annotation.NameValuePair
类名称:NameValuePair
方法名:compareTo
[英]Instances of this class compare in name-major and value-minor order.
[中]该类的实例按名称主次顺序进行比较。
代码示例来源:origin: com.android.tools.build/builder
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: nikita36078/J2ME-Loader
/** {@inheritDoc} */
@Override
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: com.android/dx
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: gdpancheng/LoonAndroid3
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: com.google.android.tools/dx
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: com.google.dexmaker/dexmaker-dx
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: com.jakewharton.android.repackaged/dalvik-dx
/** {@inheritDoc} */
@Override
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
代码示例来源:origin: dragome/dragome-sdk
/** {@inheritDoc} */
public int compareTo(Annotation other) {
int result = type.compareTo(other.type);
if (result != 0) {
return result;
}
result = visibility.compareTo(other.visibility);
if (result != 0) {
return result;
}
Iterator<NameValuePair> thisIter = elements.values().iterator();
Iterator<NameValuePair> otherIter = other.elements.values().iterator();
while (thisIter.hasNext() && otherIter.hasNext()) {
NameValuePair thisOne = thisIter.next();
NameValuePair otherOne = otherIter.next();
result = thisOne.compareTo(otherOne);
if (result != 0) {
return result;
}
}
if (thisIter.hasNext()) {
return 1;
} else if (otherIter.hasNext()) {
return -1;
}
return 0;
}
内容来源于网络,如有侵权,请联系作者删除!