xapi.util.X_Util.equal()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(1.7k)|赞(0)|评价(0)|浏览(127)

本文整理了Java中xapi.util.X_Util.equal()方法的一些代码示例,展示了X_Util.equal()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。X_Util.equal()方法的具体详情如下:
包路径:xapi.util.X_Util
类名称:X_Util
方法名:equal

X_Util.equal介绍

暂无

代码示例

代码示例来源:origin: net.wetheinter/xapi-core-collect

@Override
public boolean findRemove(E value, boolean all) {
 ListIterator<E> iter = list.listIterator();
 boolean removed = false;
 while (iter.hasNext()) {
  E next = iter.next();
  if (X_Util.equal(next, value)) {
   iter.remove();
   if (!all)
    return true;
   removed = true;
  }
 }
 return removed;
}

代码示例来源:origin: net.wetheinter/xapi-core-api

@Override
public boolean equals(Object obj) {
 if (obj == this)return true;
 if (obj instanceof Pair){
  Pair<?, ?> that = (Pair<?, ?>) obj;
  if (X_Util.equal(x, that.get0())){
   return X_Util.equal(y, that.get1());
  }
 }
 if (obj instanceof Entry){
  Entry<?, ?> that = (Entry<?, ?>) obj;
  if (X_Util.equal(x, that.getKey())){
   return X_Util.equal(y, that.getValue());
  }
 }
 return false;
}

代码示例来源:origin: net.wetheinter/xapi-gwt-collect

@Override
public final boolean contains(final E value) {
 for (final E e : forEach()) {
  if (X_Util.equal(value, e)) {
   return true;
  }
 }
 return false;
}

代码示例来源:origin: net.wetheinter/xapi-core-process

public boolean ifNext(K position) {
 if (equal(todo[this.position], position)) {
  bump();
  return true;
 }
 return false;
}

代码示例来源:origin: net.wetheinter/xapi-gwt-collect

@Override
public final int indexOf(final E value) {
 for (int i = 0, m = size(); i < m; i++) {
  if (X_Util.equal(getValue(i), value)) {
   return i;
  }
 }
 return -1;
}

代码示例来源:origin: net.wetheinter/xapi-gwt-collect

@Override
public final boolean findRemove(final E value, final boolean all) {
 boolean removed = false;
 for (int i = 0, m = size(); i < m; i++) {
  final E next = getValue(i);
  if (X_Util.equal(next, value)) {
   remove(i--);
   if (!all) {
    return true;
   }
   removed = true;
  }
 }
 return removed;
}

相关文章