code: static boolean isRegistered(final Object lhs, final Object rhs) {
          final Set<Pair<IDKey, IDKey>> registry = getRegistry();
          final Pair<IDKey, IDKey> pair = getRegisterPair(lhs, rhs);
          final Pair<IDKey, IDKey> swappedPair = new Pair<IDKey, IDKey>(pair.getKey(), pair.getValue());
  
          return registry != null
                  && (registry.contains(pair) || registry.contains(swappedPair));
      }
docs: <p>
  Returns <code>true</code> if the registry contains the given object pair.
  Used by the reflection methods to avoid infinite loops.
  Objects might be swapped therefore a check is needed if the object pair
  is registered in given or swapped order.
  </p>
  
  @param lhs <code>this</code> object to lookup in registry
  @param rhs the other object to lookup on registry
  @return boolean <code>true</code> if the registry contains the given object.
  @since 3.0