* <p>
* @return Valid chars
*/
+ @SuppressWarnings ("ReturnOfCollectionOrArrayField")
public static char[] validChars () {
// Is cache set?
if (validChars != null) {
// Debug message
//* NOISY-DEBUG: */ System.out.println(MessageFormat.format("gender={0} - adding at pos {1} ...", gender, i));
+
// Get access key as this is also the access
valid[i] = gender.getAccessChar();
package org.mxchange.jcontacts.contact.gender;
import java.io.Serializable;
-import java.text.MessageFormat;
import java.util.LinkedList;
import java.util.List;
* @return Selectable genders (not UNKNOWN)
*/
public static List<Gender> selectableGenders () {
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println("GenderUtils.selectableGenders: CALLED!"); //NOI18N
+
// Init list
List<Gender> list = new LinkedList<>();
// Walk through all genders
for (final Gender gender : Gender.values()) {
+ // Debug message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("GenderUtils.selectableGenders: gender={0}", gender)); //NOI18N
+
// Add it and check if it has been added
- assert (list.add(gender)) : MessageFormat.format("gender {0} not added.", gender); //NOI18N
+ list.add(gender);
}
+ // Trace message
+ //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("GenderUtils.selectableGenders: list.size()={0} - EXIT!", list.size())); //NOI18N
+
// Return it
return list;
}