ConversionUnit.java [src/usda/weru/util] Revision: default Date:
package usda.weru.util;
import java.util.Vector;
public class ConversionUnit{
private String c_name;
private String c_abbreviation;
private Vector<String> c_tags;
ConversionUnit(String name, String abbreviation, String... otherTags){
c_name = name;
c_abbreviation = abbreviation;
c_tags = new Vector<String>();
c_tags.add(c_name);
c_tags.add(c_abbreviation);
for(String tag : otherTags){
c_tags.add(tag);
}
}
public boolean accept(String tag){
if (c_tags == null) return false;
return c_tags.contains(tag);
}
public String getName(){
return c_name;
}
public String getAbbreviation(){
return c_abbreviation;
}
public String toString(){
return getAbbreviation();
}
}