Tabnine Logo
ComparisonMode.isIgnoringMetadata
Code IndexAdd Tabnine to your IDE (free)

How to use
isIgnoringMetadata
method
in
org.apache.sis.util.ComparisonMode

Best Java code snippets using org.apache.sis.util.ComparisonMode.isIgnoringMetadata (Showing top 16 results out of 315)

origin: apache/sis

/**
 * Compares this unit with the given object for equality,
 * optionally ignoring metadata and rounding errors.
 */
@Override
public boolean equals(final Object other, final ComparisonMode mode) {
  if (other == null || other.getClass() != getClass()) {
    return false;
  }
  if (mode.isIgnoringMetadata()) {
    return true;
  }
  final AbstractUnit<?> that = (AbstractUnit<?>) other;
  return equals(epsg, that.epsg) && equals(scope, that.scope) && Objects.equals(symbol, that.symbol);
}
origin: org.apache.sis.core/sis-utility

/**
 * Compares this unit with the given object for equality,
 * optionally ignoring metadata and rounding errors.
 */
@Override
public boolean equals(final Object other, final ComparisonMode mode) {
  if (other == null || other.getClass() != getClass()) {
    return false;
  }
  if (mode.isIgnoringMetadata()) {
    return true;
  }
  final AbstractUnit<?> that = (AbstractUnit<?>) other;
  return equals(epsg, that.epsg) && equals(scope, that.scope) && Objects.equals(symbol, that.symbol);
}
origin: apache/sis

if (other == null) return false;
if (proxy.getClass() == other.getClass()) {
  if (mode.isIgnoringMetadata()) {
    return true;
origin: org.apache.sis.core/sis-utility

if (other == null) return false;
if (proxy.getClass() == other.getClass()) {
  if (mode.isIgnoringMetadata()) {
    return true;
origin: org.apache.sis.core/sis-referencing

  /**
   * Compares the given objects for equality, ignoring parameter order in "ignore metadata" mode.
   */
  static boolean equals(final Parameters expected, final ParameterValueGroup actual, final ComparisonMode mode) {
    if (!Utilities.deepEquals(expected.getDescriptor(), actual.getDescriptor(), mode)) {
      return false;
    }
    if (!mode.isIgnoringMetadata()) {
      return Utilities.deepEquals(expected.values(), actual.values(), mode);
    }
    final List<GeneralParameterValue> values = new LinkedList<>(expected.values());
scan:   for (final GeneralParameterValue param : actual.values()) {
      final Iterator<GeneralParameterValue> it = values.iterator();
      while (it.hasNext()) {
        if (Utilities.deepEquals(it.next(), param, mode)) {
          it.remove();
          continue scan;
        }
      }
      return false;   // A parameter from 'actual' has not been found in 'expected'.
    }
    return values.isEmpty();
  }

origin: apache/sis

  /**
   * Compares the given objects for equality, ignoring parameter order in "ignore metadata" mode.
   */
  static boolean equals(final Parameters expected, final ParameterValueGroup actual, final ComparisonMode mode) {
    if (!Utilities.deepEquals(expected.getDescriptor(), actual.getDescriptor(), mode)) {
      return false;
    }
    if (!mode.isIgnoringMetadata()) {
      return Utilities.deepEquals(expected.values(), actual.values(), mode);
    }
    final List<GeneralParameterValue> values = new LinkedList<>(expected.values());
scan:   for (final GeneralParameterValue param : actual.values()) {
      final Iterator<GeneralParameterValue> it = values.iterator();
      while (it.hasNext()) {
        if (Utilities.deepEquals(it.next(), param, mode)) {
          it.remove();
          continue scan;
        }
      }
      return false;   // A parameter from 'actual' has not been found in 'expected'.
    }
    return values.isEmpty();
  }

origin: apache/sis

  /**
   * Compares this object with the given one for equality.
   *
   * @param  object  the object to compare with this reference system.
   * @param  mode    the strictness level of the comparison.
   * @return {@code true} if both objects are equal.
   */
  @Override
  public boolean equals(final Object object, final ComparisonMode mode) {
    if (super.equals(object, mode) && (object instanceof ReferenceSystem)) {
      final ReferenceSystem that = (ReferenceSystem) object;
      if (mode.isIgnoringMetadata()) {
        // Compare the name because it was ignored by super.equals(…) in "ignore metadata" mode.
        return Objects.equals(getName(), that.getName());
      }
      return that.getDomainOfValidity() == null && that.getScope() == null;
    }
    return false;
  }
}
origin: org.apache.sis.core/sis-metadata

  /**
   * Compares this object with the given one for equality.
   *
   * @param  object  the object to compare with this reference system.
   * @param  mode    the strictness level of the comparison.
   * @return {@code true} if both objects are equal.
   */
  @Override
  public boolean equals(final Object object, final ComparisonMode mode) {
    if (super.equals(object, mode) && (object instanceof ReferenceSystem)) {
      final ReferenceSystem that = (ReferenceSystem) object;
      if (mode.isIgnoringMetadata()) {
        // Compare the name because it was ignored by super.equals(…) in "ignore metadata" mode.
        return Objects.equals(getName(), that.getName());
      }
      return that.getDomainOfValidity() == null && that.getScope() == null;
    }
    return false;
  }
}
origin: apache/sis

if (mode.isIgnoringMetadata()) {
  return true;
origin: org.apache.sis.core/sis-referencing

if (mode.isIgnoringMetadata()) {
  return true;
origin: org.apache.sis.core/sis-utility

/**
 * Compares this object with the given one for equality.
 * This method compares the {@linkplain #name} only in "strict" or "by contract" modes.
 * If name is a critical component of this object, then it shall be compared by the subclass.
 * This behavior is consistent with {@link org.apache.sis.referencing.AbstractIdentifiedObject}.
 *
 * @param  object  the object to compare with this identified object.
 * @param  mode    the strictness level of the comparison.
 * @return {@code true} if both objects are equal.
 */
@Override
public boolean equals(final Object object, final ComparisonMode mode) {
  if (object == this) {
    return true;
  }
  if (object instanceof IdentifiedObject) {
    if (mode != ComparisonMode.STRICT || object.getClass() == getClass()) {
      if (mode.isIgnoringMetadata()) {
        return true;
      }
      final IdentifiedObject that = (IdentifiedObject) object;
      return Objects.equals(getName(), that.getName()) &&
          isNullOrEmpty(that.getIdentifiers()) &&
          isNullOrEmpty(that.getAlias()) &&
          that.getRemarks() == null;
    }
  }
  return false;
}
origin: apache/sis

/**
 * Compares this object with the given one for equality.
 * This method compares the {@linkplain #name} only in "strict" or "by contract" modes.
 * If name is a critical component of this object, then it shall be compared by the subclass.
 * This behavior is consistent with {@link org.apache.sis.referencing.AbstractIdentifiedObject}.
 *
 * @param  object  the object to compare with this identified object.
 * @param  mode    the strictness level of the comparison.
 * @return {@code true} if both objects are equal.
 */
@Override
public boolean equals(final Object object, final ComparisonMode mode) {
  if (object == this) {
    return true;
  }
  if (object instanceof IdentifiedObject) {
    if (mode != ComparisonMode.STRICT || object.getClass() == getClass()) {
      if (mode.isIgnoringMetadata()) {
        return true;
      }
      final IdentifiedObject that = (IdentifiedObject) object;
      return Objects.equals(getName(), that.getName()) &&
          isNullOrEmpty(that.getIdentifiers()) &&
          isNullOrEmpty(that.getAlias()) &&
          that.getRemarks() == null;
    }
  }
  return false;
}
origin: apache/sis

that.getValueClass()   == getValueClass())
if (mode.isIgnoringMetadata()) {
  return Objects.equals(toString(getName()), toString(that.getName()));
origin: org.apache.sis.core/sis-metadata

that.getValueClass()   == getValueClass())
if (mode.isIgnoringMetadata()) {
  return Objects.equals(toString(getName()), toString(that.getName()));
origin: org.apache.sis.core/sis-referencing

if ((mode.isIgnoringMetadata() ||
  (deepEquals(getScope(),                       that.getScope(), mode) &&
   deepEquals(getDomainOfValidity(),            that.getDomainOfValidity(), mode) &&
    if (mode.isIgnoringMetadata()) {
      mode = ComparisonMode.ALLOW_VARIANT;
origin: apache/sis

if ((mode.isIgnoringMetadata() ||
  (deepEquals(getScope(),                       that.getScope(), mode) &&
   deepEquals(getDomainOfValidity(),            that.getDomainOfValidity(), mode) &&
    if (mode.isIgnoringMetadata()) {
      debug = (mode == ComparisonMode.DEBUG);
      mode = ComparisonMode.ALLOW_VARIANT;
org.apache.sis.utilComparisonModeisIgnoringMetadata

Javadoc

Returns true if this comparison ignores metadata. This method currently returns true for IGNORE_METADATA, APPROXIMATIVEor DEBUG only, but this list may be extended in future SIS versions.

Popular methods of ComparisonMode

  • isApproximative
    Returns true if this comparison uses a tolerance threshold. This method currently returns true for A
  • equalityLevel
    If the two given objects are equal according one of the modes enumerated in this class, then returns
  • ordinal

Popular in Java

  • Start an intent from android
  • notifyDataSetChanged (ArrayAdapter)
  • getApplicationContext (Context)
  • addToBackStack (FragmentTransaction)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now