src/main/java/de/blau/android/presets/PresetItem.java
/**
     * Adds a fixed tag to the item
     * 
     * @param key key name of the tag
     * @param type PresetType
     * @param value value of the tag
     * @param text description of the tag return the allocated PresetField
     * @param textContext a translation context
     * @return the allocated PresetField
     */
Adds a fixed tag to the item


Adds a fixed tag to the item
@NonNull
    public PresetField addTag(final String key, final PresetKeyType type, @Nullable String value, @Nullable String text, @Nullable String textContext) {
        if (key == null) {
            throw new NullPointerException("null key not supported");
        }
        if (value == null) {
            value = "";
        }
        if (text != null) {
            text = preset.translate(text, textContext);
        }
        PresetFixedField field = new PresetFixedField(key, new StringWithDescription(value, text));
        fixedTags.put(key, field);
        fields.put(key, field);
        return field;
    }
@ NonNull public PresetField addTag ( final String key , final PresetKeyType type , @ Nullable String value , @ Nullable String text , @ Nullable String textContext ) { if ( key == null ) { throw new NullPointerException ( "null key not supported" ) ; } if ( value == null ) { value = "" ; } if ( text != null ) { text = preset . translate ( text , textContext ) ; } PresetFixedField field = new PresetFixedField ( key , new StringWithDescription ( value , text ) ) ; fixedTags . put ( key , field ) ; fields . put ( key , field ) ; return field ; }
Adds a fixed tag to the item
Adds a fixed tag to the item