org.eclipse.jdt.internal.core.util.Util.equalArraysOrNull()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(8.0k)|赞(0)|评价(0)|浏览(120)

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

Util.equalArraysOrNull介绍

[英]Compares two arrays using equals() on the elements. Either or both arrays may be null. Returns true if both are null. Returns false if only one is null. If both are arrays, returns true iff they have the same length and all elements are equal.
[中]在元素上使用equals()比较两个数组。其中一个或两个数组都可能为空。如果两者都为null,则返回true。如果只有一个为null,则返回false。如果两者都是数组,则当它们的长度相同且所有元素相等时,返回true。

代码示例

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public boolean equals(Object obj) {
  if (!(obj instanceof MemberValuePair)) {
    return false;
  }
  MemberValuePair other = (MemberValuePair) obj;
  return
    this.valueKind == other.valueKind
    && this.memberName.equals(other.memberName)
    && (this.value == other.value
      || (this.value != null && this.value.equals(other.value))
      || (this.value instanceof Object[] && other.value instanceof Object[] && Util.equalArraysOrNull((Object[])this.value, (Object[]) other.value)));
}

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean equals(Object obj) {
  if (!(obj instanceof MemberValuePair)) {
    return false;
  }
  MemberValuePair other = (MemberValuePair) obj;
  return
    this.valueKind == other.valueKind
    && this.memberName.equals(other.memberName)
    && (this.value == other.value
      || (this.value != null && this.value.equals(other.value))
      || (this.value instanceof Object[] && other.value instanceof Object[] && Util.equalArraysOrNull((Object[])this.value, (Object[]) other.value)));
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public boolean equals(Object obj) {
  if (!(obj instanceof MemberValuePair)) {
    return false;
  }
  MemberValuePair other = (MemberValuePair) obj;
  return
    this.valueKind == other.valueKind
    && this.memberName.equals(other.memberName)
    && (this.value == other.value
      || (this.value != null && this.value.equals(other.value))
      || (this.value instanceof Object[] && other.value instanceof Object[] && Util.equalArraysOrNull((Object[])this.value, (Object[]) other.value)));
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public boolean equals(Object obj) {
  if (!(obj instanceof MemberValuePair)) {
    return false;
  }
  MemberValuePair other = (MemberValuePair) obj;
  return
    this.valueKind == other.valueKind
    && this.memberName.equals(other.memberName)
    && (this.value == other.value
      || (this.value != null && this.value.equals(other.value))
      || (this.value instanceof Object[] && other.value instanceof Object[] && Util.equalArraysOrNull((Object[])this.value, (Object[]) other.value)));
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof PackageFragment)) return false;

  PackageFragment other = (PackageFragment) o;
  return Util.equalArraysOrNull(this.names, other.names) &&
      this.parent.equals(other.parent);
}
public boolean exists() {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (!(o instanceof SourceMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((SourceMethod)o).parameterTypes);
}
@Override

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof PackageFragment)) return false;

  PackageFragment other = (PackageFragment) o;
  return Util.equalArraysOrNull(this.names, other.names) &&
      this.parent.equals(other.parent);
}
@Override

代码示例来源:origin: trylimits/Eclipse-Postfix-Code-Completion

public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof PackageFragment)) return false;

  PackageFragment other = (PackageFragment) o;
  return Util.equalArraysOrNull(this.names, other.names) &&
      this.parent.equals(other.parent);
}
public boolean exists() {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof PackageFragment)) return false;

  PackageFragment other = (PackageFragment) o;
  return Util.equalArraysOrNull(this.names, other.names) &&
      this.parent.equals(other.parent);
}
public boolean exists() {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (this == o) return true;
  if (!(o instanceof PackageFragment)) return false;

  PackageFragment other = (PackageFragment) o;
  return Util.equalArraysOrNull(this.names, other.names) &&
      this.parent.equals(other.parent);
}
public boolean exists() {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

/**
 * Returns <code>true</code> if an equivalent package fragment is included in the package
 * region. Package fragments are equivalent if they both have the same name.
 */
protected boolean packageRegionContainsSamePackageFragment(PackageFragment element) {
  IJavaElement[] pkgs = this.packageRegion.getElements();
  for (int i = 0; i < pkgs.length; i++) {
    PackageFragment pkg = (PackageFragment) pkgs[i];
    if (Util.equalArraysOrNull(pkg.names, element.names))
      return true;
  }
  return false;
}

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof SourceMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((SourceMethod)o).parameterTypes);
}
public IMemberValuePair getDefaultValue() throws JavaModelException {

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof SourceMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((SourceMethod)o).parameterTypes);
}
public IMemberValuePair getDefaultValue() throws JavaModelException {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof SourceMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(this.parameterTypes, ((SourceMethod)o).parameterTypes);
}
public IMemberValuePair getDefaultValue() throws JavaModelException {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

/**
 * Returns <code>true</code> if an equivalent package fragment is included in the package
 * region. Package fragments are equivalent if they both have the same name.
 */
protected boolean packageRegionContainsSamePackageFragment(PackageFragment element) {
  IJavaElement[] pkgs = this.packageRegion.getElements();
  for (int i = 0; i < pkgs.length; i++) {
    PackageFragment pkg = (PackageFragment) pkgs[i];
    if (Util.equalArraysOrNull(pkg.names, element.names))
      return true;
  }
  return false;
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof BinaryMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}
public IAnnotation[] getAnnotations() throws JavaModelException {

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof BinaryMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}
public IAnnotation[] getAnnotations() throws JavaModelException {

代码示例来源:origin: org.eclipse.tycho/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof BinaryMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}
public IAnnotation[] getAnnotations() throws JavaModelException {

代码示例来源:origin: com.google.code.maven-play-plugin.org.eclipse.jdt/org.eclipse.jdt.core

public boolean equals(Object o) {
  if (!(o instanceof BinaryMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}
public IAnnotation[] getAnnotations() throws JavaModelException {

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.core

@Override
public boolean equals(Object o) {
  if (!(o instanceof BinaryMethod)) return false;
  return super.equals(o) && Util.equalArraysOrNull(getErasedParameterTypes(), ((BinaryMethod)o).getErasedParameterTypes());
}
@Override

相关文章

微信公众号

最新文章

更多

Util类方法