no.bekk.bekkopen.person.KJONN Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of nocommons Show documentation
Show all versions of nocommons Show documentation
The NoCommons library is a collection of helper classes for manipulation and validation of data specific to
Norway and Norwegian citizens.
package no.bekk.bekkopen.person;
public enum KJONN {
MANN, KVINNE, BEGGE;
static boolean erMann(final KJONN kjonn) {
return kjonn.equals(MANN);
}
static boolean erKvinne(final KJONN kjonn) {
return kjonn.equals(KVINNE);
}
static boolean erBegge(final KJONN kjonn) {
return kjonn.equals(BEGGE);
}
static KJONN byttKjonn(final KJONN kjonn) {
if (erKvinne(kjonn)) {
return MANN;
}
return KVINNE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy