Ignore:
Timestamp:
2016-04-04T23:13:08+02:00 (9 years ago)
Author:
Don-vip
Message:

add unit test, javadoc, remove unused and untestable code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java

    r9942 r10109  
    242242
    243243    /**
    244      * replies the tag table model for the respective point in time
     244     * Replies the tag table model for the respective point in time.
    245245     *
    246246     * @param pointInTimeType the type of the point in time (must not be null)
     
    252252        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    253253            return currentTagTableModel;
    254         else if (pointInTimeType.equals(PointInTimeType.REFERENCE_POINT_IN_TIME))
     254        else // REFERENCE_POINT_IN_TIME
    255255            return referenceTagTableModel;
    256 
    257         // should not happen
    258         return null;
    259     }
    260 
     256    }
     257
     258    /**
     259     * Replies the node list table model for the respective point in time.
     260     *
     261     * @param pointInTimeType the type of the point in time (must not be null)
     262     * @return the node list table model
     263     * @throws IllegalArgumentException if pointInTimeType is null
     264     */
    261265    public DiffTableModel getNodeListTableModel(PointInTimeType pointInTimeType) {
    262266        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
    263267        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    264268            return currentNodeListTableModel;
    265         else if (pointInTimeType.equals(PointInTimeType.REFERENCE_POINT_IN_TIME))
     269        else // REFERENCE_POINT_IN_TIME
    266270            return referenceNodeListTableModel;
    267 
    268         // should not happen
    269         return null;
    270     }
    271 
     271    }
     272
     273    /**
     274     * Replies the relation member table model for the respective point in time.
     275     *
     276     * @param pointInTimeType the type of the point in time (must not be null)
     277     * @return the relation member table model
     278     * @throws IllegalArgumentException if pointInTimeType is null
     279     */
    272280    public DiffTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) {
    273281        CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType");
    274282        if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME))
    275283            return currentRelationMemberTableModel;
    276         else if (pointInTimeType.equals(PointInTimeType.REFERENCE_POINT_IN_TIME))
     284        else // REFERENCE_POINT_IN_TIME
    277285            return referenceRelationMemberTableModel;
    278 
    279         // should not happen
    280         return null;
    281286    }
    282287
Note: See TracChangeset for help on using the changeset viewer.