public class Gender extends BitMaskBase
History:
Modifier and Type | Field and Description |
---|---|
static long |
ALL_BIT_VALUE
all bits for gender
|
static int |
FEMALE_BIT
female bit for gender
|
static int |
MALE_BIT
male bit for gender
|
static int |
NEUTER_BIT
neuter bit for gender
|
static int |
NOT_KNOWABLE_BIT
unknown gender bit for gender
|
MASK, MAX_BIT
Constructor and Description |
---|
Gender()
Creates a default gender object
|
Gender(long value)
Creates a default gender object, using a integer value
|
Modifier and Type | Method and Description |
---|---|
static long |
Enumerate(java.lang.String valueStr)
Get the long value for one single name (no combine names of bits).
|
static java.lang.String |
GetBitName(int bitValue)
Get the name (first in the name list) of a specified bit (single).
|
static java.lang.String |
GetBitName(int bitValue,
int index)
Get the name at index order of a specified bit (single).
|
static void |
main(java.lang.String[] args)
Test driver for this class
|
static java.lang.String |
ToName(long value)
Convert a long gender value to a combined string (abbreviation).
|
static long |
ToValue(java.lang.String valueStr)
Convert a combined value string to a long gender value.
|
Contains, Contains, Enumerate, GetBitFlag, GetBitIndex, GetBitName, GetBitValue, GetName, GetValue, SetBitFlag, SetValue, ToName, ToValue, ToValues
public static final int MALE_BIT
public static final int FEMALE_BIT
public static final int NEUTER_BIT
public static final int NOT_KNOWABLE_BIT
public static final long ALL_BIT_VALUE
public Gender()
public Gender(long value)
value
- number for finding it's combined namepublic static long ToValue(java.lang.String valueStr)
valueStr
- combined name in String formatpublic static java.lang.String ToName(long value)
value
- number for finding it's combined namepublic static java.lang.String GetBitName(int bitValue)
bitValue
- bit nubmer for finding it's namepublic static java.lang.String GetBitName(int bitValue, int index)
bitValue
- bit nubmer for finding it's nameindex
- the order index of the name in BIT_STR[]public static long Enumerate(java.lang.String valueStr)
valueStr
- name of a bit for finding it's long valuepublic static void main(java.lang.String[] args)
args
- arguments