Search in sources :

Example 1 with Distance

use of com.datastax.dse.driver.internal.core.data.geometry.Distance in project java-driver by datastax.

the class DistanceSerializer method readCustomValue.

@Override
protected Distance readCustomValue(int valueLength, Buffer buffer, GraphBinaryReader context) throws IOException {
    Point p = context.readValue(buffer, Point.class, false);
    checkValueSize(GraphBinaryUtils.sizeOfDistance(p), valueLength);
    return new Distance(p, context.readValue(buffer, Double.class, false));
}
Also used : Point(com.datastax.dse.driver.api.core.data.geometry.Point) Distance(com.datastax.dse.driver.internal.core.data.geometry.Distance)

Aggregations

Point (com.datastax.dse.driver.api.core.data.geometry.Point)1 Distance (com.datastax.dse.driver.internal.core.data.geometry.Distance)1