code: @Override
      public int compareTo(final RegistrationItem o) {
          int priorityDiff = 0;
          if (priority() != null) {
              if (o.priority() != null) {
                  priorityDiff = priority().level(weight()) - o.priority().level(o.weight());
              } else {
                  priorityDiff = 1;
              }
          } else {
              if (o.priority() != null) {
                  priorityDiff = -1;
              }
          }
          return priorityDiff == 0 ? this.implClass().getName().compareTo(o.implClass().getName()) : priorityDiff;
      }
docs: {@inheritDoc}