public class GeoDistance extends UnaryFieldExpression
FieldExpression.StringMode
Modifier and Type | Field and Description |
---|---|
static DistanceUnits |
DEFAULT_DISTANCE_UNITS |
expression
alias, EMPTY_ARRAY
Constructor and Description |
---|
GeoDistance(FieldExpression expression,
double latitude,
double longitude)
Construct a new FieldFunction to apply an aggregation function to another expression.
|
GeoDistance(FieldExpression expression,
double latitude,
double longitude,
DistanceUnits distanceUnits,
String alias)
Construct a new FieldFunction to apply an aggregation function to another expression with an alias.
|
GeoDistance(FieldExpression expression,
double latitude,
double longitude,
String alias)
Construct a new FieldFunction to apply an aggregation function to another expression with an alias.
|
GeoDistance(String fieldName,
double latitude,
double longitude)
Calculate the geo distance.
|
GeoDistance(String fieldName,
double latitude,
double longitude,
String alias)
Calculate the geo distance.
|
GeoDistance(String fieldName,
Point center,
DistanceUnits units) |
Modifier and Type | Method and Description |
---|---|
GeoDistance |
clone() |
protected GeoDistance |
clone(FieldExpression e)
Create a new instance of this FieldExpression, with a different argument.
|
DistanceUnits |
getDistanceUnits()
Get the units the distance will be returned in (meters, kilometers, etc)
|
double |
getLatitude()
Get the center latitude to calculate distance to.
|
double |
getLongitude()
Get the center longitude to calculate distance to.
|
SchemaField.Type |
getType(Schema schema)
Resolve the type for this expression.
|
int |
hashCode() |
protected boolean |
parametersEqual(FieldExpression other)
Returns
true if other 's parameters are the same as this . |
void |
setDistanceUnits(DistanceUnits units)
Get the units the distance will be returned in (meters, kilometers, etc)
|
void |
setLatitude(double latitude)
Set the center latitude to calculate distance to.
|
void |
setLongitude(double longitude)
Set the center longitude to calculate distance to.
|
protected void |
toString(StringBuilder buffer,
FieldExpression.StringMode mode)
Writes the string representation of this field expression to
buffer . |
equalsIgnoreAlias, getExpression, getFieldName, hasChildren, isConstant, rewrite, rewriteChildren, setExpression
as, containsAlias, copyOf, equals, equalsIgnoreAlias, getAlias, getDefaultAlias, handleFieldExpression, isConstant, quote, rewrite, setAlias, toString, toString
public static final DistanceUnits DEFAULT_DISTANCE_UNITS
public GeoDistance(String fieldName, Point center, DistanceUnits units)
public GeoDistance(String fieldName, double latitude, double longitude)
public GeoDistance(String fieldName, double latitude, double longitude, String alias)
public GeoDistance(FieldExpression expression, double latitude, double longitude)
public GeoDistance(FieldExpression expression, double latitude, double longitude, String alias)
public GeoDistance(FieldExpression expression, double latitude, double longitude, DistanceUnits distanceUnits, String alias)
public SchemaField.Type getType(Schema schema)
getType
in class FieldExpression
public DistanceUnits getDistanceUnits()
public void setDistanceUnits(DistanceUnits units)
public double getLatitude()
public void setLatitude(double latitude)
public double getLongitude()
public void setLongitude(double longitude)
protected void toString(StringBuilder buffer, FieldExpression.StringMode mode)
buffer
.
NOTE: the alias will not be written to buffer by this function.
toString
in class FieldExpression
public int hashCode()
hashCode
in class UnaryFieldExpression
protected boolean parametersEqual(FieldExpression other)
true
if other
's parameters are the same as this
.parametersEqual
in class UnaryFieldExpression
public GeoDistance clone()
clone
in class UnaryFieldExpression
protected GeoDistance clone(FieldExpression e)
clone
in class UnaryFieldExpression
Copyright © 2018 Attivio, Inc. All Rights Reserved.
PATENT NOTICE: Attivio, Inc. Software Related Patents. With respect to the Attivio software product(s) being used, the following patents apply: Querying Joined Data Within A Search Engine Index: United States Patent No.(s): 8,073,840. Ordered Processing of Groups of Messages: U.S. Patent No.(s) 8,495,656. Signal processing approach to sentiment analysis for entities in documents: U.S. Patent No.(s) 8,725,494. Other U.S. and International Patents Pending.