DATACMNS-1240 - Update copyright years to 2018.
Also, remove some trailing whitespaces and align outdated license header format.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -20,7 +20,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial box value
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -35,7 +35,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new Box spanning from the given first to the second {@link Point}.
|
||||
*
|
||||
*
|
||||
* @param first must not be {@literal null}.
|
||||
* @param second must not be {@literal null}.
|
||||
*/
|
||||
@@ -50,7 +50,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new Box from the given {@code first} to the {@code second} point represented as the {@literal double[]}.
|
||||
*
|
||||
*
|
||||
* @param first must not be {@literal null} and contain exactly 2 doubles.
|
||||
* @param second must not be {@literal null} and contain exactly 2 doubles.
|
||||
*/
|
||||
@@ -65,7 +65,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the first {@link Point} making up the {@link Box}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Point getFirst() {
|
||||
@@ -74,7 +74,7 @@ public class Box implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the second {@link Point} making up the {@link Box}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Point getSecond() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial circle value
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -38,7 +38,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given {@link Point} and radius.
|
||||
*
|
||||
*
|
||||
* @param center must not be {@literal null}.
|
||||
* @param radius must not be {@literal null} and it's value greater or equal to zero.
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given {@link Point} and radius.
|
||||
*
|
||||
*
|
||||
* @param center must not be {@literal null}.
|
||||
* @param radius's value must be greater or equal to zero.
|
||||
*/
|
||||
@@ -66,7 +66,7 @@ public class Circle implements Shape {
|
||||
/**
|
||||
* Creates a new {@link Circle} from the given coordinates and radius as {@link Distance} with a
|
||||
* {@link Metrics#NEUTRAL}.
|
||||
*
|
||||
*
|
||||
* @param centerX
|
||||
* @param centerY
|
||||
* @param radius must be greater or equal to zero.
|
||||
@@ -77,7 +77,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the center of the {@link Circle}.
|
||||
*
|
||||
*
|
||||
* @return will never be {@literal null}.
|
||||
*/
|
||||
public Point getCenter() {
|
||||
@@ -86,7 +86,7 @@ public class Circle implements Shape {
|
||||
|
||||
/**
|
||||
* Returns the radius of the {@link Circle}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public Distance getRadius() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2013-2015 the original author or authors.
|
||||
* Copyright 2013-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Value object to create custom {@link Metric}s on the fly.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -33,7 +33,7 @@ public class CustomMetric implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a custom {@link Metric} using the given multiplier.
|
||||
*
|
||||
*
|
||||
* @param multiplier
|
||||
*/
|
||||
public CustomMetric(double multiplier) {
|
||||
@@ -43,7 +43,7 @@ public class CustomMetric implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a custom {@link Metric} using the given multiplier and abbreviation.
|
||||
*
|
||||
*
|
||||
* @param multiplier
|
||||
* @param abbreviation must not be {@literal null}.
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ public class CustomMetric implements Metric {
|
||||
this.abbreviation = abbreviation;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.mongodb.core.geo.Metric#getMultiplier()
|
||||
*/
|
||||
@@ -63,7 +63,7 @@ public class CustomMetric implements Metric {
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.geo.Metric#getAbbreviation()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2015 the original author or authors.
|
||||
* Copyright 2010-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Value object to represent distances in a given metric.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -48,7 +48,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Distance} with a neutral metric. This means the provided value needs to be in normalized form.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
*/
|
||||
public Distance(double value) {
|
||||
@@ -57,7 +57,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Distance} with the given {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @param value
|
||||
* @param metric must not be {@literal null}.
|
||||
*/
|
||||
@@ -71,7 +71,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a {@link Range} between the given {@link Distance}.
|
||||
*
|
||||
*
|
||||
* @param min can be {@literal null}.
|
||||
* @param max can be {@literal null}.
|
||||
* @return will never be {@literal null}.
|
||||
@@ -82,7 +82,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Range} by creating minimum and maximum {@link Distance} from the given values.
|
||||
*
|
||||
*
|
||||
* @param minValue
|
||||
* @param minMetric can be {@literal null}.
|
||||
* @param maxValue
|
||||
@@ -95,7 +95,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Returns the normalized value regarding the underlying {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getNormalizedValue() {
|
||||
@@ -104,7 +104,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Returns a {@link String} representation of the unit the distance is in.
|
||||
*
|
||||
*
|
||||
* @return the unit
|
||||
* @see Metric#getAbbreviation()
|
||||
*/
|
||||
@@ -115,7 +115,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
/**
|
||||
* Adds the given distance to the current one. The resulting {@link Distance} will be in the same metric as the
|
||||
* current one.
|
||||
*
|
||||
*
|
||||
* @param other must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -130,7 +130,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
|
||||
/**
|
||||
* Adds the given {@link Distance} to the current one and forces the result to be in a given {@link Metric}.
|
||||
*
|
||||
*
|
||||
* @param other must not be {@literal null}.
|
||||
* @param metric must not be {@literal null}.
|
||||
* @return
|
||||
@@ -149,7 +149,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
/**
|
||||
* Returns a new {@link Distance} in the given {@link Metric}. This means that the returned instance will have the
|
||||
* same normalized value as the original instance.
|
||||
*
|
||||
*
|
||||
* @param metric must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -160,7 +160,7 @@ public class Distance implements Serializable, Comparable<Distance> {
|
||||
return this.metric.equals(metric) ? this : new Distance(getNormalizedValue() * metric.getMultiplier(), metric);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see java.lang.Comparable#compareTo(java.lang.Object)
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2016 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
|
||||
/**
|
||||
* Custom module to deserialize the geo-spatial value objects using Jackson 2.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @since 1.8
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.ObjectUtils;
|
||||
/**
|
||||
* Custom {@link Page} to carry the average distance retrieved from the {@link GeoResults} the {@link GeoPage} is set up
|
||||
* from.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -42,7 +42,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoPage} from the given {@link GeoResults}.
|
||||
*
|
||||
*
|
||||
* @param content must not be {@literal null}.
|
||||
*/
|
||||
public GeoPage(GeoResults<T> results) {
|
||||
@@ -54,7 +54,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoPage} from the given {@link GeoResults}, {@link Pageable} and total.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param pageable must not be {@literal null}.
|
||||
* @param total
|
||||
@@ -66,7 +66,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
this.averageDistance = results.getAverageDistance();
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.PageImpl#equals(java.lang.Object)
|
||||
*/
|
||||
@@ -86,7 +86,7 @@ public class GeoPage<T> extends PageImpl<GeoResult<T>> {
|
||||
return super.equals(obj) && ObjectUtils.nullSafeEquals(this.averageDistance, that.averageDistance);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.domain.PageImpl#hashCode()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -22,7 +22,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Value object capturing some arbitrary object plus a distance.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,7 +28,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Value object to capture {@link GeoResult}s as well as the average distance they have.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -44,7 +44,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance manually calculating the average distance from the distance values of the
|
||||
* given {@link GeoResult}s.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
*/
|
||||
public GeoResults(List<? extends GeoResult<T>> results) {
|
||||
@@ -54,7 +54,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance manually calculating the average distance in the given {@link Metric}
|
||||
* from the distance values of the given {@link GeoResult}s.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param metric must not be {@literal null}.
|
||||
*/
|
||||
@@ -64,7 +64,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Creates a new {@link GeoResults} instance from the given {@link GeoResult}s and average distance.
|
||||
*
|
||||
*
|
||||
* @param results must not be {@literal null}.
|
||||
* @param averageDistance must not be {@literal null}.
|
||||
*/
|
||||
@@ -80,7 +80,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Returns the average distance of all {@link GeoResult}s in this list.
|
||||
*
|
||||
*
|
||||
* @return the averageDistance
|
||||
*/
|
||||
public Distance getAverageDistance() {
|
||||
@@ -89,7 +89,7 @@ public class GeoResults<T> implements Iterable<GeoResult<T>>, Serializable {
|
||||
|
||||
/**
|
||||
* Returns the actual content of the {@link GeoResults}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<GeoResult<T>> getContent() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Interface for {@link Metric}s that can be applied to a base scale.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -28,14 +28,14 @@ public interface Metric extends Serializable {
|
||||
|
||||
/**
|
||||
* Returns the multiplier to calculate metrics values from a base scale.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
double getMultiplier();
|
||||
|
||||
/**
|
||||
* Returns the scientific abbreviation of the unit the {@link Metric} is in.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
String getAbbreviation();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2015 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -17,7 +17,7 @@ package org.springframework.data.geo;
|
||||
|
||||
/**
|
||||
* Commonly used {@link Metric}s.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -31,7 +31,7 @@ public enum Metrics implements Metric {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Metrics} using the given multiplier.
|
||||
*
|
||||
*
|
||||
* @param multiplier the earth radius at equator, must not be {@literal null}.
|
||||
* @param abbreviation the abbreviation to use for this {@link Metric}, must not be {@literal null}.
|
||||
*/
|
||||
@@ -49,7 +49,7 @@ public enum Metrics implements Metric {
|
||||
return multiplier;
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.data.geo.Metric#getAbbreviation()
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2010-2014 the original author or authors.
|
||||
* Copyright 2010-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
* Represents a geospatial point value.
|
||||
*
|
||||
*
|
||||
* @author Mark Pollack
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
@@ -39,7 +39,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Creates a {@link Point} from the given {@code x}, {@code y} coordinate.
|
||||
*
|
||||
*
|
||||
* @param x
|
||||
* @param y
|
||||
*/
|
||||
@@ -51,7 +51,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Creates a {@link Point} from the given {@link Point} coordinate.
|
||||
*
|
||||
*
|
||||
* @param point must not be {@literal null}.
|
||||
*/
|
||||
public Point(Point point) {
|
||||
@@ -64,7 +64,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Returns the x-coordinate of the {@link Point}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getX() {
|
||||
@@ -73,7 +73,7 @@ public class Point implements Serializable {
|
||||
|
||||
/**
|
||||
* Returns the y-coordinate of the {@link Point}.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public double getY() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Simple value object to represent a {@link Polygon}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
* @since 1.8
|
||||
@@ -43,7 +43,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Polygon} for the given Points.
|
||||
*
|
||||
*
|
||||
* @param x must not be {@literal null}.
|
||||
* @param y must not be {@literal null}.
|
||||
* @param z must not be {@literal null}.
|
||||
@@ -65,7 +65,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Creates a new {@link Polygon} for the given Points.
|
||||
*
|
||||
*
|
||||
* @param points must not be {@literal null}.
|
||||
*/
|
||||
@PersistenceConstructor
|
||||
@@ -86,7 +86,7 @@ public class Polygon implements Iterable<Point>, Shape {
|
||||
|
||||
/**
|
||||
* Returns all {@link Point}s the {@link Polygon} is made of.
|
||||
*
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public List<Point> getPoints() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2011-2014 the original author or authors.
|
||||
* Copyright 2011-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* Common interface for all shapes. Allows building external representations of them.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Thomas Darimont
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2017 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.StringUtils;
|
||||
* Converter to create {@link Distance} instances from {@link String} representations. The supported format is a decimal
|
||||
* followed by whitespace and a metric abbreviation. We currently support the following abbreviations:
|
||||
* {@value #SUPPORTED_METRICS}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
* @author Christoph Strobl
|
||||
*/
|
||||
@@ -57,7 +57,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
SUPPORTED_METRICS = Collections.unmodifiableMap(metrics);
|
||||
}
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
@@ -88,7 +88,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
/**
|
||||
* Converts the given {@link String} source into a distance. Expects the source to reflect the {@link Metric} as held
|
||||
* in the {@link #SUPPORTED_METRICS} map.
|
||||
*
|
||||
*
|
||||
* @param source must not be {@literal null}.
|
||||
* @return
|
||||
*/
|
||||
@@ -110,7 +110,7 @@ public enum DistanceFormatter implements Converter<String, Distance>, Formatter<
|
||||
|
||||
/**
|
||||
* Creates a {@link Distance} from the given source String and the {@link Metric} detected.
|
||||
*
|
||||
*
|
||||
* @param source the raw source {@link String}, must not be {@literal null} or empty.
|
||||
* @param metric the {@link Metric} detected keyed by the keyword it was detected for, must not be {@literal null}.
|
||||
* @return
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2014-2015 the original author or authors.
|
||||
* Copyright 2014-2018 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -27,7 +27,7 @@ import org.springframework.format.Formatter;
|
||||
|
||||
/**
|
||||
* Converter to parse two comma-separated doubles into a {@link Point}.
|
||||
*
|
||||
*
|
||||
* @author Oliver Gierke
|
||||
*/
|
||||
public enum PointFormatter implements Converter<String, Point>, Formatter<Point> {
|
||||
@@ -38,7 +38,7 @@ public enum PointFormatter implements Converter<String, Point>, Formatter<Point>
|
||||
|
||||
private static final String INVALID_FORMAT = "Expected two doubles separated by a comma but got '%s'!";
|
||||
|
||||
/*
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
* @see org.springframework.core.convert.converter.Converter#convert(java.lang.Object)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user