public static Description describe(final char[] pin){
  if (pin == null || pin.length == 0) {
    return new Description(0,EnumSet.noneOf(CharacterClass.class));
  }
  EnumSet<CharacterClass> classes=EnumSet.noneOf(CharacterClass.class);
  for (  char ch : pin) {
    classes.add(CharacterClass.of(ch));
  }
  return new Description(pin.length,classes);
}

public static Description describe ( final char [ ] pin ) { if ( pin == null || pin . length == 0 ) { return new Description ( 0 , EnumSet . noneOf ( CharacterClass . class ) ) ; } EnumSet < CharacterClass > classes = EnumSet . noneOf ( CharacterClass . class ) ; for ( char ch : pin ) { classes . add ( CharacterClass . of ( ch ) ) ; } return new Description ( pin . length , classes ) ; }
describes the specified pin according to the policy note . this method cannot handle unicode supplementary characters .
