Ignore:
Timestamp:
2015-06-20T23:42:21+02:00 (9 years ago)
Author:
Don-vip
Message:

checkstyle: enable relevant whitespace checks and fix them

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/tagging/TagEditorModel.java

    r8444 r8510  
    3636
    3737    /** the list holding the tags */
    38     protected final transient List<TagModel> tags =new ArrayList<>();
     38    protected final transient List<TagModel> tags = new ArrayList<>();
    3939
    4040    /** indicates whether the model is dirty */
     
    147147        switch(col) {
    148148        case 0:
    149             updateTagName(tag, (String)value);
     149            updateTagName(tag, (String) value);
    150150            break;
    151151        case 1:
    152             String v = (String)value;
     152            String v = (String) value;
    153153            if (tag.getValueCount() > 1 && !v.isEmpty()) {
    154154                updateTagValue(tag, v);
     
    290290        Iterator<TagModel> it = tags.iterator();
    291291        boolean changed = false;
    292         while(it.hasNext()) {
     292        while (it.hasNext()) {
    293293            TagModel tm = it.next();
    294294            if (tm.getName().equals(name)) {
     
    352352        for (String key : primitive.keySet()) {
    353353            String value = primitive.get(key);
    354             this.tags.add(new TagModel(key,value));
     354            this.tags.add(new TagModel(key, value));
    355355        }
    356356        TagModel tag = new TagModel();
     
    366366     * @param tags the tags of an OSM primitive
    367367     */
    368     public void initFromTags(Map<String,String> tags) {
     368    public void initFromTags(Map<String, String> tags) {
    369369        this.tags.clear();
    370370        for (Entry<String, String> entry : tags.entrySet()) {
     
    385385    public void initFromTags(TagCollection tags) {
    386386        this.tags.clear();
    387         if (tags == null){
     387        if (tags == null) {
    388388            setDirty(false);
    389389            return;
     
    391391        for (String key : tags.getKeys()) {
    392392            String value = tags.getJoinedValues(key);
    393             this.tags.add(new TagModel(key,value));
     393            this.tags.add(new TagModel(key, value));
    394394        }
    395395        sort();
     
    407407     */
    408408    public void applyToPrimitive(Tagged primitive) {
    409         Map<String,String> tags = primitive.getKeys();
     409        Map<String, String> tags = primitive.getKeys();
    410410        applyToTags(tags, false);
    411411        primitive.setKeys(tags);
     
    436436    }
    437437
    438     public Map<String,String> getTags() {
     438    public Map<String, String> getTags() {
    439439        return getTags(false);
    440440    }
    441441
    442     public Map<String,String> getTags(boolean keepEmpty) {
    443         Map<String,String> tags = new HashMap<>();
     442    public Map<String, String> getTags(boolean keepEmpty) {
     443        Map<String, String> tags = new HashMap<>();
    444444        applyToTags(tags, keepEmpty);
    445445        return tags;
     
    494494                if (!currentkeys.contains(oldkey)) {
    495495                    ChangePropertyCommand deleteCommand =
    496                         new ChangePropertyCommand(primitive,oldkey,null);
     496                        new ChangePropertyCommand(primitive, oldkey, null);
    497497                    commands.add(deleteCommand);
    498498                }
     
    581581
    582582        Map<String, TagModel> modelTags = new HashMap<>();
    583         for (int i=0; i<getRowCount(); i++) {
     583        for (int i = 0; i < getRowCount(); i++) {
    584584            TagModel tagModel = get(i);
    585585            modelTags.put(tagModel.getName(), tagModel);
     
    627627            rowSelectionModel.setValueIsAdjusting(true);
    628628            colSelectionModel.setValueIsAdjusting(true);
    629             if (rowMin >= 0 && rowMax >=0) {
     629            if (rowMin >= 0 && rowMax >= 0) {
    630630                rowSelectionModel.setSelectionInterval(rowMin, rowMax);
    631631            }
    632             if (colMin >=0 && colMax >= 0) {
     632            if (colMin >= 0 && colMax >= 0) {
    633633                colSelectionModel.setSelectionInterval(colMin, colMax);
    634634            }
Note: See TracChangeset for help on using the changeset viewer.