Skip to content

Commit

Permalink
[GEOT-6494] addressing javadoc warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Jody Garnett <jody.garnett@gmail.com>
  • Loading branch information
jodygarnett committed Jan 31, 2020
1 parent 7e4cdaa commit fcf2ea7
Show file tree
Hide file tree
Showing 29 changed files with 195 additions and 180 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@ public interface Expression {
*/
Expression NIL = new NilExpression();

/** Evaluates the given expression based on the content of the given object. */
/**
* Evaluates the given expression based on the content of the given object.
*
* @return computed value
*/
@Extension
Object evaluate(Object object);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ public MBStyle(JSONObject json) {
*
* @param json Required to be a JSONObject
* @return MBStyle wrapping the provided json
* @throws MBFormatException
* @throws MBFormatException JSON content inconsistent with specification
*/
public static MBStyle create(Object json) throws MBFormatException {
if (json instanceof JSONObject) {
Expand All @@ -113,7 +113,7 @@ public static MBStyle create(Object json) throws MBFormatException {
/**
* Access the layer with the provided id.
*
* @param id
* @param id Id of layer to access
* @return layer with the provided id, or null if not found.
*/
public MBLayer layer(String id) {
Expand Down Expand Up @@ -184,7 +184,7 @@ public List<MBLayer> layers() {
/**
* Access layers matching provided source.
*
* @param source
* @param source Data source
* @return list of layers matching provided source
*/
public List<MBLayer> layers(String source) throws MBFormatException {
Expand Down Expand Up @@ -327,7 +327,7 @@ public String getGlyphs() {
* Data source specifications.
*
* @see MBSource
* @return Map of data source name -> {@link MBSource} instances.
* @return Map of data source name to {@link MBSource} instances.
*/
public Map<String, MBSource> getSources() {
Map<String, MBSource> sourceMap = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,10 @@ public class MapBoxStyle {
/**
* Read in the provided JSON as a {@link StyledLayerDescriptor}.
*
* @param reader
* @param reader JSON content
* @return generated style
* @throws ParseException Invalid JSON provided
* @throws IOException Problem reading definition from reader
*/
public static StyledLayerDescriptor parse(Reader reader) throws IOException, ParseException {
MBStyleParser parser = new MBStyleParser();
Expand All @@ -57,8 +59,10 @@ public static StyledLayerDescriptor parse(Reader reader) throws IOException, Par
/**
* Read in the provided JSON as a {@link StyledLayerDescriptor}.
*
* @param stream
* @param stream JSON content
* @return generated style
* @throws ParseException Invalid JSON provided
* @throws IOException Problem reading definition from stream
*/
public static StyledLayerDescriptor parse(InputStream stream)
throws IOException, ParseException {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="AllFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
*
* <p>Examples:
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="AnyFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@
*
* <p>Examples:
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="CaseFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,7 @@
*
* <p>Examples:
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="CoalesceFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@
*
* <p>Examples:
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="MapBoxEqualToFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="MapBoxNotEqualToFunction exmaples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="MatchFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
*
* <p>
*
* <table border="1" cellpadding="3">
* <table border="1" cellpadding="3" summary="RemainderFunction examples">
* <tr>
* <th align="center">Expression</th>
* <th align="center">Output</th>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public Number getBackgroundOpacity() {
*
* <p>Optional number. Defaults to 1.
*
* @retur The opacity at which the background will be drawn.
* @return The opacity at which the background will be drawn.
*/
public Expression backgroundOpacity() {
return parse.percentage(paint, "background-opacity", 1.0);
Expand All @@ -140,11 +140,6 @@ public Expression backgroundOpacity() {
/**
* Transform {@link BackgroundMBLayer} to GeoTools FeatureTypeStyle.
*
* <p>Notes:
*
* <ul>
* </ul>
*
* @param styleContext The MBStyle to which this layer belongs, used as a context for things
* like resolving sprite and glyph names to full urls.
* @return FeatureTypeStyle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ protected SemanticType defaultSemanticType() {
* (Optional) Circle radius in pixels. Defaults to 5.
*
* @return The circle radius
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Number getCircleRadius() throws MBFormatException {
return parse.optional(Double.class, paint, "circle-radius", 5.0);
Expand All @@ -80,7 +80,7 @@ public Number getCircleRadius() throws MBFormatException {
* Access circle-radius as literal or function expression, defaults to 5
*
* @return The circle radius as literal or function expression
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleRadius() throws MBFormatException {
return parse.percentage(paint, "circle-radius", 5);
Expand All @@ -90,7 +90,7 @@ public Expression circleRadius() throws MBFormatException {
* (Optional) The fill color of the circle. Defaults to #000000.
*
* @return The fill color of the circle
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Color getCircleColor() throws MBFormatException {
return parse.optional(Color.class, paint, "circle-color", Color.BLACK);
Expand All @@ -100,7 +100,7 @@ public Color getCircleColor() throws MBFormatException {
* Access circle-color as literal or function expression, defaults to black.
*
* @return The circle color as literal or function expression
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleColor() throws MBFormatException {
return parse.color(paint, "circle-color", Color.BLACK);
Expand All @@ -111,7 +111,7 @@ public Expression circleColor() throws MBFormatException {
* full opacity. Defaults to 0.
*
* @return The amount to blur the circle.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Number getCircleBlur() throws MBFormatException {
return parse.optional(Double.class, paint, "circle-blur", 0.0);
Expand All @@ -121,7 +121,7 @@ public Number getCircleBlur() throws MBFormatException {
* Access circle-blur as literal or function expression, defaults to 0
*
* @return The amount to blur the circle, as literal or function expression
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleBlur() throws MBFormatException {
return parse.percentage(paint, "circle-blur", 0);
Expand All @@ -131,7 +131,7 @@ public Expression circleBlur() throws MBFormatException {
* (Optional) The opacity at which the circle will be drawn. Defaults to 1.
*
* @return The opacity at which the circle will be drawn.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Number getCircleOpacity() throws MBFormatException {
return parse.optional(Double.class, paint, "circle-opacity", 1.0);
Expand All @@ -141,7 +141,7 @@ public Number getCircleOpacity() throws MBFormatException {
* Access circle-opacity, defaults to 1.
*
* @return The opacity at which the circle will be drawn as literal or function expression.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleOpacity() throws MBFormatException {
return parse.percentage(paint, "circle-opacity", 1);
Expand All @@ -152,7 +152,7 @@ public Expression circleOpacity() throws MBFormatException {
* respectively. Units in pixels. Defaults to 0, 0.
*
* @return x and y offset in pixels.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public int[] getCircleTranslate() throws MBFormatException {
return parse.array(paint, "circle-translate", new int[] {0, 0});
Expand All @@ -162,7 +162,7 @@ public int[] getCircleTranslate() throws MBFormatException {
* Access circle-translate
*
* @return x and y offset in pixels as Point
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Point circleTranslate() throws MBFormatException {
int[] circleTranslate = getCircleTranslate();
Expand All @@ -180,7 +180,7 @@ public Point circleTranslate() throws MBFormatException {
* filter-translate: [ 0, { property: "building-height", "TYPE":"exponential","stops": [[0,0],[30, 5]] }
* </pre>
*
* @return
* @return Displacement to offset symbol
*/
public Displacement circleTranslateDisplacement() {
return parse.displacement(
Expand Down Expand Up @@ -253,7 +253,7 @@ public CirclePitchScale getCirclePitchScale() {
* <p>Units in pixels. Defaults to 0.
*
* @return The circle stroke width.
* @throws MBFormatException JSON provided does conform to specificationthrows
* @throws MBFormatException JSON provided inconsistent with specificaitonthrows
*/
public Number getCircleStrokeWidth() throws MBFormatException {
return parse.optional(Double.class, paint, "circle-stroke-width", 0.0);
Expand All @@ -263,7 +263,7 @@ public Number getCircleStrokeWidth() throws MBFormatException {
* Access circle-stroke-width, defaults to 0.
*
* @return The circle stroke width.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleStrokeWidth() throws MBFormatException {
return parse.percentage(paint, "circle-stroke-width", 0);
Expand All @@ -275,7 +275,7 @@ public Expression circleStrokeWidth() throws MBFormatException {
* <p>Defaults to #000000.
*
* @return The color of the circle stroke.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Color getCircleStrokeColor() throws MBFormatException {
return parse.optional(Color.class, paint, "circle-stroke-color", Color.BLACK);
Expand All @@ -285,7 +285,7 @@ public Color getCircleStrokeColor() throws MBFormatException {
* Access circle-stroke-color as literal or function expression, defaults to black.
*
* @return The color of the circle stroke.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Expression circleStrokeColor() throws MBFormatException {
return parse.color(paint, "circle-stroke-color", Color.BLACK);
Expand All @@ -297,7 +297,7 @@ public Expression circleStrokeColor() throws MBFormatException {
* <p>Defaults to 1.
*
* @return Number representing the stroke opacity.
* @throws MBFormatException JSON provided does conform to specification
* @throws MBFormatException JSON provided inconsistent with specificaiton
*/
public Number getCircleStrokeOpacity() throws MBFormatException {
return parse.optional(Double.class, paint, "circle-stroke-opacity", 1.0);
Expand All @@ -307,7 +307,7 @@ public Number getCircleStrokeOpacity() throws MBFormatException {
* Access circle-stroke-opacity, defaults to 1.
*
* @return Number representing the stroke opacity.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Expression circleStrokeOpacity() throws MBFormatException {
return parse.percentage(paint, "circle-stroke-opacity", 1);
Expand All @@ -316,11 +316,6 @@ public Expression circleStrokeOpacity() throws MBFormatException {
/**
* Transform {@link CircleMBLayer} to GeoTools FeatureTypeStyle.
*
* <p>Notes:
*
* <ul>
* </ul>
*
* @param styleContext The MBStyle to which this layer belongs, used as a context for things
* like resolving sprite and glyph names to full urls.
* @return FeatureTypeStyle
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ protected SemanticType defaultSemanticType() {
* per-feature, basis, and data-driven styling is not available.
*
* @return The opacity of the fill extrusion layer.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Number getFillExtrusionOpacity() throws MBFormatException {
return parse.optional(Double.class, paint, "fill-extrusion-opacity", 1.0);
Expand All @@ -101,7 +101,7 @@ public Number getFillExtrusionOpacity() throws MBFormatException {
* Access fill-extrusion-opacity as literal or function expression
*
* @return The opacity of the fill extrusion layer.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Expression fillExtrusionOpacity() throws MBFormatException {
return parse.percentage(paint, "fill-extrusion-opacity", 1.0);
Expand Down Expand Up @@ -199,7 +199,7 @@ public Number getFillExtrusionHeight() throws MBFormatException {
* Access fill-extrusion-height as literal or function expression
*
* @return The height with which to extrude this layer.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Expression fillExtrusionHeight() throws MBFormatException {
return parse.percentage(paint, "fill-extrusion-height", 0.0);
Expand All @@ -221,7 +221,7 @@ public Number getFillExtrusionBase() throws MBFormatException {
* Access fill-extrusion-base as literal or function expression
*
* @return The height with which to extrude the base of this layer
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Expression fillExtrusionBase() throws MBFormatException {
return parse.percentage(paint, "fill-extrusion-base", 0.0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public Expression getFillAntialias() {
* <p>Defaults to 1.
*
* @return The opacity of the layer.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Number getFillOpacity() throws MBFormatException {
return parse.optional(Double.class, paint, "fill-opacity", 1.0);
Expand All @@ -112,7 +112,7 @@ public Number getFillOpacity() throws MBFormatException {
* Access fill-opacity, defaults to 1.
*
* @return The opacity of the layer.
* @throws MBFormatException
* @throws MBFormatException JSON provided inconsistent with specification
*/
public Expression fillOpacity() throws MBFormatException {
return parse.percentage(paint, "fill-opacity", 1);
Expand Down
Loading

0 comments on commit fcf2ea7

Please sign in to comment.