io.quarkus.redis.datasource.geo.GeoItem Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-redis-client Show documentation
Show all versions of quarkus-redis-client Show documentation
Connect to Redis in either imperative or reactive style
package io.quarkus.redis.datasource.geo;
import static io.smallrye.mutiny.helpers.ParameterValidation.nonNull;
/**
* Represents a value attached to a {@link GeoPosition}.
*/
public class GeoItem {
public final V member;
public final GeoPosition position;
public static GeoItem of(V item, double longitude, double latitude) {
return new GeoItem<>(item, GeoPosition.of(longitude, latitude));
}
public static GeoItem of(V item, GeoPosition position) {
return new GeoItem<>(item, position);
}
private GeoItem(V member, GeoPosition position) {
this.member = member;
this.position = nonNull(position, "position");
}
public V member() {
return member;
}
public GeoPosition position() {
return position;
}
public double longitude() {
return position.longitude();
}
public double latitude() {
return position.latitude();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy