All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.quarkus.redis.datasource.geo.GeoItem Maven / Gradle / Ivy

There is a newer version: 3.17.5
Show newest version
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