![JAR search and dependency download from the Maven repository](/logo.png)
gov.nih.nlm.nls.lvg.Db.EuiVector Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lvg2010dist Show documentation
Show all versions of lvg2010dist Show documentation
LVG tools is used by Apache cTAKES.
The newest version!
package gov.nih.nlm.nls.lvg.Db;
import java.util.*;
import gov.nih.nlm.nls.lvg.Util.*;
/*****************************************************************************
* This class provides a special Collection Vector for eui records.
*
* History:
*
*
*
* @author NLM NLS Development Team
*
* @see InflectionRecord
*
* @version V-2010
****************************************************************************/
public class EuiVector extends Vector
{
// public methods
/**
* Add a new EuiRecord into EuiVector. Combine categories and inflections
* if they are same Eui
*
*/
protected void Add(E obj)
{
EuiRecord newRec = (EuiRecord) obj;
boolean existFlag = false;
for(int i = 0; i < size(); i++)
{
EuiRecord rec = (EuiRecord) elementAt(i);
if(rec.GetEui().equals(newRec.GetEui()) == true)
{
int cat = Bit.Add(rec.GetCategory(), newRec.GetCategory());
long infl =
Bit.Add(rec.GetInflection(), newRec.GetInflection());
rec.SetCategory(cat);
rec.SetInflection(infl);
existFlag = true;
break;
}
}
if(existFlag == false)
{
addElement(obj);
}
}
private final static long serialVersionUID = 5L;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy