org.hibernate.search.elasticsearch.schema.impl.json

## Class AnalysisJsonElementEquivalence

- java.lang.Object
- - org.hibernate.search.elasticsearch.schema.impl.json.AnalysisJsonElementEquivalence

- Direct Known Subclasses:
    AnalysisJsonElementUnorderedArrayEquivalence

      public class AnalysisJsonElementEquivalence
      extends Object

  Determines whether two `JsonElement`s should be considered equivalent.
  Author:
    Yoann Rodiere

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalysisJsonElementEquivalence()`
    `AnalysisJsonElementEquivalence(AnalysisJsonElementEquivalence itemEquivalence)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `isArrayEquivalent(com.google.gson.JsonArray left, com.google.gson.JsonArray right)`
    `protected boolean` | `isElementEquivalent(com.google.gson.JsonElement left, com.google.gson.JsonElement right)`
    `boolean` | `isEquivalent(com.google.gson.JsonElement left, com.google.gson.JsonElement right)` Determines whether two `JsonElement`s should be considered equivalent.
    `protected boolean` | `isNestedEquivalent(com.google.gson.JsonElement left, com.google.gson.JsonElement right)`
    `protected boolean` | `isObjectEquivalent(com.google.gson.JsonObject left, com.google.gson.JsonObject right)`
    `protected boolean` | `isPrimitiveEquivalent(com.google.gson.JsonPrimitive left, com.google.gson.JsonPrimitive right)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AnalysisJsonElementEquivalence

          public AnalysisJsonElementEquivalence()

    - #### AnalysisJsonElementEquivalence

          public AnalysisJsonElementEquivalence(AnalysisJsonElementEquivalence itemEquivalence)

  - ### Method Detail

    - #### isEquivalent

          public boolean isEquivalent(com.google.gson.JsonElement left,
                                      com.google.gson.JsonElement right)

      Determines whether two `JsonElement`s should be considered equivalent.
      Parameters:
        `left` - An element whose equivalence to `right` will be tested.
        `right` - An element whose equivalence to `left` will be tested.
      Returns:
        `true` if `left` and `right` are equivalent, `false` otherwise.

    - #### isPrimitiveEquivalent

          protected boolean isPrimitiveEquivalent(com.google.gson.JsonPrimitive left,
                                                  com.google.gson.JsonPrimitive right)

    - #### isArrayEquivalent

          protected boolean isArrayEquivalent(com.google.gson.JsonArray left,
                                              com.google.gson.JsonArray right)

    - #### isObjectEquivalent

          protected boolean isObjectEquivalent(com.google.gson.JsonObject left,
                                               com.google.gson.JsonObject right)

    - #### isNestedEquivalent

          protected boolean isNestedEquivalent(com.google.gson.JsonElement left,
                                               com.google.gson.JsonElement right)

    - #### isElementEquivalent

          protected boolean isElementEquivalent(com.google.gson.JsonElement left,
                                                com.google.gson.JsonElement right)

Copyright © 2006-2017 Red Hat, Inc. All Rights Reserved