public void addTag(final String key,final PresetKeyType type,String value,String text){
  if (key == null)   throw new NullPointerException("null key not supported");
  if (value == null)   value="";
  if (text != null && po != null) {
    text=po.t(text);
  }
  fixedTags.put(key,new StringWithDescription(value,text));
  if (!chunk) {
    tagItems.add(key + "\t" + value,this);
  }
  keyType.put(key,type);
  if (appliesTo(ElementType.NODE))   autosuggestNodes.add(key,value.length() > 0 ? new StringWithDescription(value,text) : null);
  if (appliesTo(ElementType.WAY))   autosuggestWays.add(key,value.length() > 0 ? new StringWithDescription(value,text) : null);
  if (appliesTo(ElementType.CLOSEDWAY))   autosuggestClosedways.add(key,value.length() > 0 ? new StringWithDescription(value,text) : null);
  if (appliesTo(ElementType.RELATION))   autosuggestRelations.add(key,value.length() > 0 ? new StringWithDescription(value,text) : null);
  if (appliesTo(ElementType.AREA))   autosuggestAreas.add(key,value.length() > 0 ? new StringWithDescription(value,text) : null);
}

public void addTag ( final String key , final PresetKeyType type , String value , String text ) { if ( key == null ) throw new NullPointerException ( "null key not supported" ) ; if ( value == null ) value = "" ; if ( text != null && po != null ) { text = po . t ( text ) ; } fixedTags . put ( key , new StringWithDescription ( value , text ) ) ; if ( ! chunk ) { tagItems . add ( key + "\t" + value , this ) ; } keyType . put ( key , type ) ; if ( appliesTo ( ElementType . NODE ) ) autosuggestNodes . add ( key , value . length ( ) > 0 ? new StringWithDescription ( value , text ) : null ) ; if ( appliesTo ( ElementType . WAY ) ) autosuggestWays . add ( key , value . length ( ) > 0 ? new StringWithDescription ( value , text ) : null ) ; if ( appliesTo ( ElementType . CLOSEDWAY ) ) autosuggestClosedways . add ( key , value . length ( ) > 0 ? new StringWithDescription ( value , text ) : null ) ; if ( appliesTo ( ElementType . RELATION ) ) autosuggestRelations . add ( key , value . length ( ) > 0 ? new StringWithDescription ( value , text ) : null ) ; if ( appliesTo ( ElementType . AREA ) ) autosuggestAreas . add ( key , value . length ( ) > 0 ? new StringWithDescription ( value , text ) : null ) ; }
adds a fixed tag to the item , registers the item in the tagitems map and populates autosuggest .
