Lvg Java
2006p Version

gov.nih.nlm.nls.lvg.Lib
Class Inflection

java.lang.Object
  extended by gov.nih.nlm.nls.lvg.Lib.BitMaskBase
      extended by gov.nih.nlm.nls.lvg.Lib.Inflection

public class Inflection
extends BitMaskBase

This Inflection class extends BitMaskBase class and performs as LVG Inflection.

History:

Version:
V-2006p
Author:
NLM NLS Development Team
See Also:
Design document

Field Summary
static long ALL_BIT_VALUE
           
static int BASE_BIT
          base bit for inflection: xx (noun, adjv, verb)
static int COMPARATIVE_BIT
          comparative bit for inflection: xx (adjv) + er
static int INFINITIVE_BIT
          infinitive bit for inflection: xx (verb)
static long LOWER_INFLECTIONS
          All bits for inflection
static long[] MapSimpleInfl_
          Mapping simple inflections
static long NO_BIT_VALUE
           
static int PAST_1P_2_3P_BIT
          past (1p_2_3p) bit for inflection: xx (were)
static int PAST_1P_2_3P_NEG_BIT
          past negative (1p_2_3p) bit for inflection: xx (weren't)
static int PAST_1S_3S_BIT
          past (1s_3s) bit for inflection: xx (was)
static int PAST_1S_3S_NEG_BIT
          past negative (1s_3s) bit for inflection: xx (wasn't)
static int PAST_BIT
          past bit for inflection: xx (verb) + ed
static int PAST_NEG_BIT
          past negative bit for inflection: xx (couldn't, didn't)
static int PAST_PART_BIT
          past [articiple bit for inflection: xx (verb) + en
static int PLURAL_BIT
          plural bit for inflection: xx (noun) + s
static int POSITIVE_BIT
          positive bit for inflection: xx (adjv)
static int PRES_1_2_3P_BIT
          present (1_2_3p) bit for inflection: xx (verb)
static int PRES_1_2_3P_NEG_BIT
          present negative (1_2_3p) bit for inflection: xx (don't)
static int PRES_1P_2_3P_BIT
          present (1p_2_3p) bit for inflection: xx (are)
static int PRES_1P_2_3P_NEG_BIT
          present negative (1p_2_3p) bit for inflection: xx (aren't)
static int PRES_1S_BIT
          present (1s) bit for inflection: xx (verb, am)
static int PRES_3S_BIT
          present 3ps bit for inflection: xx (verb) + s
static int PRES_3S_NEG_BIT
          present negative (3s) bit for inflection: xx (isn't, hasn't)
static int PRES_BIT
          present bit for inflection: xx (can)
static int PRES_NEG_BIT
          present negative bit for inflection: xx (can't, cannot)
static int PRES_PART_BIT
          present participle bit for inflection: xx (verb) + ing
static int SIMPLE_BITS
           
static int SINGULAR_BIT
          sigular bit for inflection: xx (noun)
static int SUPERLATIVE_BIT
          superlative bit for inflection: xx (adjv) + est
static int TOTAL_BITS
           
static long UPPER_INFLECTIONS
           
 
Fields inherited from class gov.nih.nlm.nls.lvg.Lib.BitMaskBase
mask_, MAX_BIT
 
Constructor Summary
Inflection()
          Creates a default inflection object
Inflection(long value)
          Creates a default inflection object, using a long value
 
Method Summary
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 inflection value to a combined string (abbreviation).
static long ToValue(java.lang.String valueStr)
          Convert a combined value string to a long inflection value.
static java.util.Vector ToValues(long value)
          Get a Vector include all values from the combined value.
static long[] ToValuesArray(long value)
          Get an array includes all values from the combined value.
 
Methods inherited from class gov.nih.nlm.nls.lvg.Lib.BitMaskBase
Contains, Contains, Enumerate, GetBitFlag, GetBitIndex, GetBitName, GetBitValue, GetName, GetValue, SetBitFlag, SetValue, ToName, ToValue, ToValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BASE_BIT

public static final int BASE_BIT
base bit for inflection: xx (noun, adjv, verb)

See Also:
Constant Field Values

COMPARATIVE_BIT

public static final int COMPARATIVE_BIT
comparative bit for inflection: xx (adjv) + er

See Also:
Constant Field Values

SUPERLATIVE_BIT

public static final int SUPERLATIVE_BIT
superlative bit for inflection: xx (adjv) + est

See Also:
Constant Field Values

PLURAL_BIT

public static final int PLURAL_BIT
plural bit for inflection: xx (noun) + s

See Also:
Constant Field Values

PRES_PART_BIT

public static final int PRES_PART_BIT
present participle bit for inflection: xx (verb) + ing

See Also:
Constant Field Values

PAST_BIT

public static final int PAST_BIT
past bit for inflection: xx (verb) + ed

See Also:
Constant Field Values

PAST_PART_BIT

public static final int PAST_PART_BIT
past [articiple bit for inflection: xx (verb) + en

See Also:
Constant Field Values

PRES_3S_BIT

public static final int PRES_3S_BIT
present 3ps bit for inflection: xx (verb) + s

See Also:
Constant Field Values

POSITIVE_BIT

public static final int POSITIVE_BIT
positive bit for inflection: xx (adjv)

See Also:
Constant Field Values

SINGULAR_BIT

public static final int SINGULAR_BIT
sigular bit for inflection: xx (noun)

See Also:
Constant Field Values

INFINITIVE_BIT

public static final int INFINITIVE_BIT
infinitive bit for inflection: xx (verb)

See Also:
Constant Field Values

PRES_1_2_3P_BIT

public static final int PRES_1_2_3P_BIT
present (1_2_3p) bit for inflection: xx (verb)

See Also:
Constant Field Values

PAST_NEG_BIT

public static final int PAST_NEG_BIT
past negative bit for inflection: xx (couldn't, didn't)

See Also:
Constant Field Values

PRES_1_2_3P_NEG_BIT

public static final int PRES_1_2_3P_NEG_BIT
present negative (1_2_3p) bit for inflection: xx (don't)

See Also:
Constant Field Values

PRES_1S_BIT

public static final int PRES_1S_BIT
present (1s) bit for inflection: xx (verb, am)

See Also:
Constant Field Values

PAST_1P_2_3P_NEG_BIT

public static final int PAST_1P_2_3P_NEG_BIT
past negative (1p_2_3p) bit for inflection: xx (weren't)

See Also:
Constant Field Values

PAST_1P_2_3P_BIT

public static final int PAST_1P_2_3P_BIT
past (1p_2_3p) bit for inflection: xx (were)

See Also:
Constant Field Values

PAST_1S_3S_NEG_BIT

public static final int PAST_1S_3S_NEG_BIT
past negative (1s_3s) bit for inflection: xx (wasn't)

See Also:
Constant Field Values

PRES_1P_2_3P_BIT

public static final int PRES_1P_2_3P_BIT
present (1p_2_3p) bit for inflection: xx (are)

See Also:
Constant Field Values

PRES_1P_2_3P_NEG_BIT

public static final int PRES_1P_2_3P_NEG_BIT
present negative (1p_2_3p) bit for inflection: xx (aren't)

See Also:
Constant Field Values

PAST_1S_3S_BIT

public static final int PAST_1S_3S_BIT
past (1s_3s) bit for inflection: xx (was)

See Also:
Constant Field Values

PRES_BIT

public static final int PRES_BIT
present bit for inflection: xx (can)

See Also:
Constant Field Values

PRES_3S_NEG_BIT

public static final int PRES_3S_NEG_BIT
present negative (3s) bit for inflection: xx (isn't, hasn't)

See Also:
Constant Field Values

PRES_NEG_BIT

public static final int PRES_NEG_BIT
present negative bit for inflection: xx (can't, cannot)

See Also:
Constant Field Values

LOWER_INFLECTIONS

public static final long LOWER_INFLECTIONS
All bits for inflection

See Also:
Constant Field Values

UPPER_INFLECTIONS

public static final long UPPER_INFLECTIONS
See Also:
Constant Field Values

SIMPLE_BITS

public static final int SIMPLE_BITS
See Also:
Constant Field Values

TOTAL_BITS

public static final int TOTAL_BITS
See Also:
Constant Field Values

ALL_BIT_VALUE

public static final long ALL_BIT_VALUE
See Also:
Constant Field Values

NO_BIT_VALUE

public static final long NO_BIT_VALUE
See Also:
Constant Field Values

MapSimpleInfl_

public static long[] MapSimpleInfl_
Mapping simple inflections

Constructor Detail

Inflection

public Inflection()
Creates a default inflection object


Inflection

public Inflection(long value)
Creates a default inflection object, using a long value

Method Detail

ToValue

public static long ToValue(java.lang.String valueStr)
Convert a combined value string to a long inflection value.

Parameters:
valueStr - combined name in String format
Returns:
a long value of the specified name

ToName

public static java.lang.String ToName(long value)
Convert a long inflection value to a combined string (abbreviation).

Parameters:
value - number for finding it's combined name
Returns:
name in a String format

GetBitName

public static java.lang.String GetBitName(int bitValue)
Get the name (first in the name list) of a specified bit (single). The first one in LVG is the abbreviation name.

Parameters:
bitValue - bit nubmer for finding it's name
Returns:
name of the bit specified

GetBitName

public static java.lang.String GetBitName(int bitValue,
                                          int index)
Get the name at index order of a specified bit (single).

Parameters:
bitValue - bit nubmer for finding it's name
index - the order index of the name in bitStr_[]
Returns:
name at index order of the bit specified

Enumerate

public static long Enumerate(java.lang.String valueStr)
Get the long value for one single name (no combine names of bits).

Parameters:
valueStr - name of a bit for finding it's long value
Returns:
a long value of the specified name

ToValues

public static java.util.Vector ToValues(long value)
Get a Vector include all values from the combined value. For example, a value of 129 will return a vector contains two elements (Long) with value of 1 and 128.

Parameters:
value - combined value
Returns:
a Vector include all values from the combined value

ToValuesArray

public static long[] ToValuesArray(long value)
Get an array includes all values from the combined value. For example, a value of 129 will return an array contains two elements (long) with value of 1 and 128.

Parameters:
value - combined value
Returns:
an array includes all values from the combined value

main

public static void main(java.lang.String[] args)
Test driver for this class


Lvg Java
2006p Version

Submit a bug or feature

Copyright © 2006p National Library of Medicine