proper toStrings of filters

This commit is contained in:
fjy 2014-04-22 14:46:19 -07:00
parent 4c7399bfbf
commit f1d705cb73
4 changed files with 40 additions and 4 deletions

View File

@ -67,4 +67,13 @@ public class JavaScriptDimFilter implements DimFilter
.put(functionBytes)
.array();
}
@Override
public String toString()
{
return "JavaScriptDimFilter{" +
"dimension='" + dimension + '\'' +
", function='" + function + '\'' +
'}';
}
}

View File

@ -69,4 +69,13 @@ public class RegexDimFilter implements DimFilter
.put(patternBytes)
.array();
}
@Override
public String toString()
{
return "RegexDimFilter{" +
"dimension='" + dimension + '\'' +
", pattern='" + pattern + '\'' +
'}';
}
}

View File

@ -64,9 +64,18 @@ public class SearchQueryDimFilter implements DimFilter
final byte[] queryBytes = query.getCacheKey();
return ByteBuffer.allocate(1 + dimensionBytes.length + queryBytes.length)
.put(DimFilterCacheHelper.SEARCH_QUERY_TYPE_ID)
.put(dimensionBytes)
.put(queryBytes)
.array();
.put(DimFilterCacheHelper.SEARCH_QUERY_TYPE_ID)
.put(dimensionBytes)
.put(queryBytes)
.array();
}
@Override
public String toString()
{
return "SearchQueryDimFilter{" +
"dimension='" + dimension + '\'' +
", query=" + query +
'}';
}
}

View File

@ -99,4 +99,13 @@ public class SpatialDimFilter implements DimFilter
result = 31 * result + (bound != null ? bound.hashCode() : 0);
return result;
}
@Override
public String toString()
{
return "SpatialDimFilter{" +
"dimension='" + dimension + '\'' +
", bound=" + bound +
'}';
}
}