code: @Override
      public E normalizeValue(final E value, final boolean caseSensitive)
      {
          E bestSoFar = null;
  
          /*
           * Only string lists make sense to normalize.
           */
          if (!(value instanceof String)) { return value; }
  
          String stringValue = (String) value;
          for (final E listItem : list)
          {
              String stringListItem = (String) listItem;
  
              stringValue = stringValue.toLowerCase();
              stringListItem = stringListItem.toLowerCase();
  
              if (stringListItem.startsWith(stringValue))
              {
                  if (stringListItem.length() == stringValue.length())
                  {
                      /*
                       * exactly matches something in the list, take the list item
                       * so that true normalization occurs
                       */
                      if (caseSensitive)
                          return listItem;
                      return value;
                  }
                  if (bestSoFar != null)
                  {
                      /*
                       * Ambiguous list value. This will cause an error later.
                       */
                      return value;
                  }
                  /*
                   * We must take what is in the list in cases where the user
                   * enters in a shortened version of the listitem.
                   */
                  bestSoFar = listItem;
              }
          }
          if (bestSoFar != null)
              /*
               * Only one thing matched so lets return the normalized value
               * instead. This will cause the validation to succeed.
               */
              return bestSoFar;
          /*
           * This will most likely cause a validation error later.
           */
          return value;
      }
docs: {@inheritDoc}