Ignore:
Timestamp:
2016-07-11T22:48:15+02:00 (10 years ago)
Author:
donvip
Message:

checkstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/indoorhelper/src/model/IndoorLevel.java

    r32122 r32637  
    2222
    2323/**
    24  * 
     24 *
    2525 * The class to save a level of the building.
    26  * 
     26 *
    2727 * @author egru
    2828 *
     
    3030
    3131public class IndoorLevel {
    32        
    33         private Tag levelNumberTag;
    34         private Tag nameTag;
    35        
    36         /**
    37          * Constructor which adds the level number.
    38          *
    39          * @param levelNumber number of the level
    40          */
    41         public IndoorLevel(int levelNumber) {
    42                 this.setLevelNumber(levelNumber);
    43         }
    44        
    45         /**
    46          * Constructor which adds level number and name tag.
    47          *       
    48          * @param levelNumber number of the level
    49          * @param nameTag optional name tag for the level
    50          */
    51         public IndoorLevel(int levelNumber, String nameTag) {
    52                 this.setLevelNumber(levelNumber);
    53                 this.setNameTag(nameTag);
    54         }
    55        
    56         /**
    57          * Getter for the level tag
    58          *
    59          * @return the complete level number tag
    60          */
    61         public Tag getLevelNumberTag() {
    62                 return this.levelNumberTag;
    63         }
    64        
    65         /**
    66          * Function to get the level number
    67          *
    68          * @return level number as an Integer
    69          */
    70         public int getLevelNumber(){
    71                 return Integer.parseInt(this.levelNumberTag.getValue());
    72         }
    73        
    74         /**
    75          * Setter for the level number
    76          *
    77          * @param levelNumber number of the level
    78          */
    79         public void setLevelNumber(int levelNumber) {
    80                 this.levelNumberTag = new Tag("indoor:level", Integer.toString(levelNumber));
    81         }
    82        
    83         /**
    84          * Getter for the name tag
    85          *
    86          * @return the complete name tag
    87          */
    88         public Tag getNameTag() {
    89                 return this.nameTag;
    90         }
    91        
    92         /**
    93          * Function to get the optional name of the level.
    94          *
    95          * @return String with the optional name.
    96          */
    97         public String getName(){
    98                 return this.nameTag.getValue();
    99         }
    100        
    101         /**
    102          * Setter for the name tag
    103          *
    104          * @param nameTag String which optionally describes the level
    105          */
    106         public void setNameTag(String nameTag) {
    107                 this.nameTag = new Tag("indoor:level:name", nameTag);
    108         }
    109        
    110         public boolean hasEmptyName(){
    111                 if(this.nameTag==null){
    112                         return true;
    113                 } else {
    114                         return false;
    115                 }
    116         }
    117        
     32
     33    private Tag levelNumberTag;
     34    private Tag nameTag;
     35
     36    /**
     37     * Constructor which adds the level number.
     38     *
     39     * @param levelNumber number of the level
     40     */
     41    public IndoorLevel(int levelNumber) {
     42        this.setLevelNumber(levelNumber);
     43    }
     44
     45    /**
     46     * Constructor which adds level number and name tag.
     47     *
     48     * @param levelNumber number of the level
     49     * @param nameTag optional name tag for the level
     50     */
     51    public IndoorLevel(int levelNumber, String nameTag) {
     52        this.setLevelNumber(levelNumber);
     53        this.setNameTag(nameTag);
     54    }
     55
     56    /**
     57     * Getter for the level tag
     58     *
     59     * @return the complete level number tag
     60     */
     61    public Tag getLevelNumberTag() {
     62        return this.levelNumberTag;
     63    }
     64
     65    /**
     66     * Function to get the level number
     67     *
     68     * @return level number as an Integer
     69     */
     70    public int getLevelNumber() {
     71        return Integer.parseInt(this.levelNumberTag.getValue());
     72    }
     73
     74    /**
     75     * Setter for the level number
     76     *
     77     * @param levelNumber number of the level
     78     */
     79    public void setLevelNumber(int levelNumber) {
     80        this.levelNumberTag = new Tag("indoor:level", Integer.toString(levelNumber));
     81    }
     82
     83    /**
     84     * Getter for the name tag
     85     *
     86     * @return the complete name tag
     87     */
     88    public Tag getNameTag() {
     89        return this.nameTag;
     90    }
     91
     92    /**
     93     * Function to get the optional name of the level.
     94     *
     95     * @return String with the optional name.
     96     */
     97    public String getName() {
     98        return this.nameTag.getValue();
     99    }
     100
     101    /**
     102     * Setter for the name tag
     103     *
     104     * @param nameTag String which optionally describes the level
     105     */
     106    public void setNameTag(String nameTag) {
     107        this.nameTag = new Tag("indoor:level:name", nameTag);
     108    }
     109
     110    public boolean hasEmptyName() {
     111        if (this.nameTag == null) {
     112            return true;
     113        } else {
     114            return false;
     115        }
     116    }
    118117}
Note: See TracChangeset for help on using the changeset viewer.