sourceafis.simple
Enum Finger

java.lang.Object
  extended by java.lang.Enum<Finger>
      extended by sourceafis.simple.Finger
All Implemented Interfaces:
Serializable, Comparable<Finger>

public enum Finger
extends Enum<Finger>

Finger position on hand.

Finger position is used to speed up matching by skipping fingerprint pairs that cannot match due to incompatible position. SourceAFIS will return zero similarity score for incompatible fingerprint pairs.

This feature is optional. It can be disabled by using finger position ANY which is default value of finger property for new Fingerprint objects.

A compatible fingerprint pair consists of two fingerprints with the same finger position, e.g. RIGHT_THUMB matches only other RIGHT_THUMB. Alternatively, compatible fingerprint pair can be also formed if one of the fingerprints has ANY finger position, e.g. ANY can be matched against all other finger positions and all other finger positions can be matched against ANY. Two fingerprints with ANY positions are compatible as well, of course.

All enum values have numeric codes like in C# or C++. Documentation for each enum value notes its numeric code. The numeric code can be read by calling toByte() method on the enum value. Numeric code can be converted to enum value by calling valueOf(int).

See Also:
Fingerprint.setFinger

Enum Constant Summary
ANY
          Unspecified finger position (0).
LEFT_INDEX
          Index finger on the left hand (4).
LEFT_LITTLE
          Little finger on the left hand (10).
LEFT_MIDDLE
          Middle finger on the left hand (6).
LEFT_RING
          Ring finger on the left hand (8).
LEFT_THUMB
          Thumb finger on the left hand (2).
RIGHT_INDEX
          Index finger on the right hand (3).
RIGHT_LITTLE
          Little finger on the right hand (9).
RIGHT_MIDDLE
          Middle finger on the right hand (5).
RIGHT_RING
          Ring finger on the right hand (7).
RIGHT_THUMB
          Thumb finger on the right hand (1).
 
Method Summary
 byte toByte()
          Converts enum value to its numeric code.
static Finger valueOf(int code)
          Converts numeric code to the corresponding enum value.
static Finger valueOf(String name)
          Returns the enum constant of this type with the specified name.
static Finger[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

ANY

public static final Finger ANY
Unspecified finger position (0).


RIGHT_THUMB

public static final Finger RIGHT_THUMB
Thumb finger on the right hand (1).


LEFT_THUMB

public static final Finger LEFT_THUMB
Thumb finger on the left hand (2).


RIGHT_INDEX

public static final Finger RIGHT_INDEX
Index finger on the right hand (3).


LEFT_INDEX

public static final Finger LEFT_INDEX
Index finger on the left hand (4).


RIGHT_MIDDLE

public static final Finger RIGHT_MIDDLE
Middle finger on the right hand (5).


LEFT_MIDDLE

public static final Finger LEFT_MIDDLE
Middle finger on the left hand (6).


RIGHT_RING

public static final Finger RIGHT_RING
Ring finger on the right hand (7).


LEFT_RING

public static final Finger LEFT_RING
Ring finger on the left hand (8).


RIGHT_LITTLE

public static final Finger RIGHT_LITTLE
Little finger on the right hand (9).


LEFT_LITTLE

public static final Finger LEFT_LITTLE
Little finger on the left hand (10).

Method Detail

values

public static Finger[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (Finger c : Finger.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Finger valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

toByte

public byte toByte()
Converts enum value to its numeric code.

Returns:
numeric code associated with this enum value

valueOf

public static Finger valueOf(int code)
Converts numeric code to the corresponding enum value.

Parameters:
code - the numeric code to be converted
Returns:
enum value corresponding to the numeric code
Throws:
IllegalArgumentException - if the argument doesn't correspond to any enum value