as shown in the title, you want to extend the properties by inheriting the GeoResult class
//GeoResult
public class GeoResult<T> implements Serializable {
private static final long serialVersionUID = 1637452570977581370L;
private final T content; private final Distance distance;
public GeoResult(T content, Distance distance) {
Assert.notNull(content, "Content must not be null!");
Assert.notNull(distance, "Distance must not be null!");
this.content = content;
this.distance = distance;
}
}
//GeoResult
public class GeoExtendResult<T> extends GeoResult<T> implements Serializable{
public GeoExtendResult(T content, Distance distance) {
super(content, distance);
}
}
//
List<GeoResult<RedisGeoCommands.GeoLocation<String>>> geoResultList = radiusGeo.getContent();
//
List<GeoExtendResult<RedisGeoCommands.GeoLocation<String>>> geoResultList = radiusGeo.getContent();