Skip to content

Commit 499babd

Browse files
fix for prevalence being a double instead of int
1 parent 91c5f68 commit 499babd

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/com/ibm/watson/developer_cloud/concept_expansion/v1/ConceptExpansion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ private String decodeResult(String result) {
176176
*/
177177
private Concept formatConcept(JsonObject conceptJson){
178178
return new Concept(conceptJson.get("result").getAsString(),
179-
conceptJson.get("prevalence").getAsInt());
179+
conceptJson.get("prevalence").getAsDouble());
180180
}
181181

182182
/**

src/main/java/com/ibm/watson/developer_cloud/concept_expansion/v1/model/Concept.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public class Concept {
3030
private String name;
3131

3232
/** The prevalence. */
33-
private int prevalence;
33+
private Double prevalence;
3434

3535
/**
3636
* Instantiates a new concept.
@@ -40,7 +40,7 @@ public class Concept {
4040
* @param prevalence
4141
* the prevalence
4242
*/
43-
public Concept(String name, int prevalence) {
43+
public Concept(String name, Double prevalence) {
4444
super();
4545
this.name = name;
4646
this.prevalence = prevalence;
@@ -62,7 +62,7 @@ public String getName() {
6262
*
6363
* @return the prevalence
6464
*/
65-
public int getPrevalence() {
65+
public Double getPrevalence() {
6666
return prevalence;
6767
}
6868

0 commit comments

Comments
 (0)