Skip to content

Commit

Permalink
Cleaning up Javadoc, and fixing class name typo. (Whups)
Browse files Browse the repository at this point in the history
  • Loading branch information
domesticmouse committed Aug 15, 2017
1 parent b830072 commit 7459bd2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 14 deletions.
11 changes: 4 additions & 7 deletions src/main/java/com/google/maps/model/AutocompletePrediction.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,13 @@ public static class MatchedSubstring {
}

/**
* Describe the location of the entered term in the prediction result text, so that the term can
* be highlighted if desired.
* The locations of the entered term in the prediction result text, so that the term can be
* highlighted if desired.
*/
public MatchedSubstring matchedSubstrings[];

/**
* Structured formatting contains a description of how the autocomplete query matched the returned
* result.
*/
public AutcompleteStructuredFormatting structuredFormatting;
/** A description of how the autocomplete query matched the returned result. */
public AutocompleteStructuredFormatting structuredFormatting;

/**
* Identifies each section of the returned description. (A section of the description is generally
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@

package com.google.maps.model;

/** Represents the Structured Formatting field of an {@see AutocompletePrediction}. */
public class AutcompleteStructuredFormatting {
/** The structured formatting info for a {@link com.google.maps.model.AutocompletePrediction}. */
public class AutocompleteStructuredFormatting {

/** Contains the main text of a prediction, usually the name of the place. */
/** The main text of a prediction, usually the name of the place. */
public String mainText;

/** Contains an array of where the query matched the returned main text. */
/** Where the query matched the returned main text. */
public AutocompletePrediction.MatchedSubstring mainTextMatchedSubstrings[];

/** Contains the secondary text of a prediction, usually the location of the place. */
/** The secondary text of a prediction, usually the location of the place. */
public String secondaryText;
}
4 changes: 2 additions & 2 deletions src/test/java/com/google/maps/PlacesApiTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import static org.junit.Assert.assertTrue;

import com.google.maps.model.AddressComponentType;
import com.google.maps.model.AutcompleteStructuredFormatting;
import com.google.maps.model.AutocompletePrediction;
import com.google.maps.model.AutocompletePrediction.MatchedSubstring;
import com.google.maps.model.AutocompleteStructuredFormatting;
import com.google.maps.model.ComponentFilter;
import com.google.maps.model.LatLng;
import com.google.maps.model.OpeningHours.Period;
Expand Down Expand Up @@ -132,7 +132,7 @@ public void testAutocompletePredictionStructuredFormatting() throws Exception {
final AutocompletePrediction prediction = predictions[0];
assertNotNull(prediction);
assertEquals("1033 Princes Highway, Heathmere, Victoria, Australia", prediction.description);
final AutcompleteStructuredFormatting structuredFormatting = prediction.structuredFormatting;
final AutocompleteStructuredFormatting structuredFormatting = prediction.structuredFormatting;
assertNotNull(structuredFormatting);
assertEquals("1033 Princes Highway", structuredFormatting.mainText);
assertEquals("Heathmere, Victoria, Australia", structuredFormatting.secondaryText);
Expand Down

0 comments on commit 7459bd2

Please sign in to comment.