Coverage Report - org.codeforamerica.open311.facade.exceptions.GeoReportV2Error
 
Classes in this File Line Coverage Branch Coverage Complexity
GeoReportV2Error
100%
7/7
N/A
1
 
 1  
 package org.codeforamerica.open311.facade.exceptions;
 2  
 
 3  
 /**
 4  
  * Wraps a GeoReport v2 API error. <a
 5  
  * href="http://wiki.open311.org/GeoReport_v2#Errors">More info</>.
 6  
  * 
 7  
  * @author Santiago MunĂ­n <santimunin@gmail.com>
 8  
  * 
 9  
  */
 10  
 public class GeoReportV2Error {
 11  
         private String code;
 12  
         private String description;
 13  
         private static final String NAME = "GeoReportError";
 14  
 
 15  
         public GeoReportV2Error(String code, String description) {
 16  3
                 super();
 17  3
                 this.code = code;
 18  3
                 this.description = description;
 19  3
         }
 20  
 
 21  
         public String getCode() {
 22  3
                 return code;
 23  
         }
 24  
 
 25  
         public String getDescription() {
 26  3
                 return description;
 27  
         }
 28  
 
 29  
         public String toString() {
 30  3
                 return NAME + " #" + code + ": " + description;
 31  
         }
 32  
 
 33  
 }