cafe.fingerprintauthentication
Class FingerprintCacheData

java.lang.Object
  extended by cafe.fingerprintauthentication.FingerprintCacheData
All Implemented Interfaces:
java.lang.Comparable<FingerprintCacheData>

public class FingerprintCacheData
extends java.lang.Object
implements java.lang.Comparable<FingerprintCacheData>

This class implements the prototype for data-objects which are stored in the FingerprintCache-class.

Since:
1.0 Parts made by Veli-Pekka Kestilä(vpk) Copyright(C) Veli-Pekka Kestilä And are lisenced under LGPL accordin the agreement between copyright holder and Unversity of Helsinki. Parts made by others Copyright(C) University of Helsinki Following notice currently only concerns parts written by Veli-Pekka Kestilä. Lisence of parts made by others is not know in the time of this writing. This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Version:
1.0
Author:
vpk

Constructor Summary
FingerprintCacheData(int id)
          Creates new FingerprintCacheData object with specified id for searching purposes in FingerprintCache class.
FingerprintCacheData(int id, com.griaule.grfingerjava.Template data)
          Creates new FingerprintCacheData object with specified id and data.
 
Method Summary
 void addTime()
          This method is called when this Fingerprint matches the user submitted fingerprint.
 int compareTo(FingerprintCacheData obj)
          Used to compare this object with others.
 boolean equals(java.lang.Object obj)
          For comparing if the given object equals this one.
 java.util.Date getAccessDate()
          Get last access date.
 com.griaule.grfingerjava.Template getData()
          Returns the fingerprint data
 int getID()
          Returns the fingeprint id
 int getTimes()
          Get info how many times the object is accessed.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FingerprintCacheData

public FingerprintCacheData(int id)
Creates new FingerprintCacheData object with specified id for searching purposes in FingerprintCache class.

Parameters:
id - Fingerprint id.

FingerprintCacheData

public FingerprintCacheData(int id,
                            com.griaule.grfingerjava.Template data)
Creates new FingerprintCacheData object with specified id and data.

Parameters:
id - Fingerprint id;
data - Fingerprint Template data.
Method Detail

compareTo

public int compareTo(FingerprintCacheData obj)
Used to compare this object with others. It will tell if the object has been accessed more than the other object and if objects access times are same which one has been accessed more recently.

Specified by:
compareTo in interface java.lang.Comparable<FingerprintCacheData>
Parameters:
obj - Another FingerprintCacheData object.
Returns:
returns info according the Comparable interface.

equals

public boolean equals(java.lang.Object obj)
For comparing if the given object equals this one. Used for searching object with certain id from fingeprint cache.

Overrides:
equals in class java.lang.Object
Parameters:
obj - Another FingerprintCacheData object.
Returns:
true if two objects are equal.

getID

public int getID()
Returns the fingeprint id

Returns:
Fingerprint id.

getData

public com.griaule.grfingerjava.Template getData()
Returns the fingerprint data

Returns:
Fingerprint data.

addTime

public void addTime()
This method is called when this Fingerprint matches the user submitted fingerprint. This is used to sort the fingerprints for fast access.


getTimes

public int getTimes()
Get info how many times the object is accessed.

Returns:
How many times object is accessed.

getAccessDate

public java.util.Date getAccessDate()
Get last access date.

Returns:
Last access date.