private Object readResolve(){
synchronized (levels) {
    for (    Level level : levels) {
      if (value != level.value) {
        continue;
      }
      if (!name.equals(level.name)) {
        continue;
      }
      if (Objects.equal(resourceBundleName,level.resourceBundleName)) {
        return level;
      }
    }
    levels.add(this);
    return this;
  }
}

private Object readResolve ( ) { synchronized ( levels ) { for ( Level level : levels ) { if ( value != level . value ) { continue ; } if ( ! name . equals ( level . name ) ) { continue ; } if ( Objects . equal ( resourceBundleName , level . resourceBundleName ) ) { return level ; } } levels . add ( this ) ; return this ; } }
serialization helper method to maintain singletons and add any new levels .
