Skip to content

Commit

Permalink
moved log4j conf to test package and code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
ferhatsb committed May 7, 2013
1 parent 7921a39 commit 56d7c84
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions src/main/java/io/searchbox/core/search/facet/RangeFacet.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package io.searchbox.core.search.facet;

import java.util.ArrayList;
import java.util.List;

import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

import java.util.ArrayList;
import java.util.List;

/**
* @author ferhat
*/
Expand All @@ -18,17 +18,17 @@ public class RangeFacet extends Facet {
public RangeFacet(String name, JsonObject rangeFacet) {
this.name = name;
ranges = new ArrayList<Range>();
for (JsonElement termv : rangeFacet.get("ranges").getAsJsonArray()) {
JsonObject term = (JsonObject) termv;
for (JsonElement termv : rangeFacet.get("ranges").getAsJsonArray()) {
JsonObject term = (JsonObject) termv;
Range range = new Range(
term.has("from" )?term.get("from" ).getAsDouble():null,
term.has("to" )?term.get("to" ).getAsDouble():null,
term.has("count" )?term.get("count" ).getAsLong():null,
term.has("total_count")?term.get("total_count").getAsLong():null,
term.has("total" )?term.get("total" ).getAsDouble():null,
term.has("min" )?term.get("min" ).getAsDouble():null,
term.has("max" )?term.get("max" ).getAsDouble():null,
term.has("mean" )?term.get("mean" ).getAsDouble():null);
term.has("from") ? term.get("from").getAsDouble() : null,
term.has("to") ? term.get("to").getAsDouble() : null,
term.has("count") ? term.get("count").getAsLong() : null,
term.has("total_count") ? term.get("total_count").getAsLong() : null,
term.has("total") ? term.get("total").getAsDouble() : null,
term.has("min") ? term.get("min").getAsDouble() : null,
term.has("max") ? term.get("max").getAsDouble() : null,
term.has("mean") ? term.get("mean").getAsDouble() : null);
ranges.add(range);
}
}
Expand Down
File renamed without changes.

0 comments on commit 56d7c84

Please sign in to comment.