From 2340ad97e0e18a34999fb8a1118de32b47c4b310 Mon Sep 17 00:00:00 2001 From: Frida Tveit Date: Thu, 22 Dec 2016 19:12:12 +0000 Subject: [PATCH 1/2] Added javadoc to RecognizedPlate. --- .../intelligence/RecognizedPlate.java | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java b/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java index 4c35228..fab1c0d 100644 --- a/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java +++ b/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java @@ -20,22 +20,46 @@ import java.util.Vector; +/** + * This class represents a number plate being recognized. As each character (represented by {@link RecognizedChar}) + * is recognized it gets added to the {@code RecognizedPlate}. + */ public class RecognizedPlate { private Vector chars; + /** + * Constructs a new {@code RecognizedPlate} with no {@code RecognizedChar}s + */ public RecognizedPlate() { this.chars = new Vector(); } + /** + * Adds one instance of {@link RecognizedChar} to the list of {@code RecognizedChar}s which have been + * recognized for this plate. + * @param chr The new {@link RecognizedChar} to be added + */ public void addChar(RecognizedChar chr) { this.chars.add(chr); } + /** + * This method is for getting a specific {@link RecognizedChar} which has been added to this plate. + * @param i The index of the {@link RecognizedChar} to be returned + * @return The {@link RecognizedChar} which was the {@code i}th one to be added to this plate (starting from 0) + * @throws ArrayIndexOutOfBoundsException if {@code i} is larger than the number of {@code RecognizedChar}s added + * - 1 or {@code i} is less than 0. + */ public RecognizedChar getChar(int i) { return this.chars.elementAt(i); } + /** + * This method is for getting a string representation of all the {@code RecognizedChar}s added to this plate. + * @return A string is made up of the character stored in the first pattern of each {@link RecognizedChar} with + * a space in between each one. + */ public String getString() { String ret = new String(""); for (int i = 0; i < this.chars.size(); i++) { @@ -44,6 +68,9 @@ public String getString() { return ret; } + /** + * @return All the {@code RecognizedChar}s added to this plate + */ public Vector getChars() { return chars; } From 148ec69e2a5c6c37a5a8a2e8eaefb67decac3a58 Mon Sep 17 00:00:00 2001 From: Frida Tveit Date: Fri, 23 Dec 2016 15:27:50 +0000 Subject: [PATCH 2/2] Added full stop to javadoc comments in RecognizedPlate --- src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java b/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java index fab1c0d..ed48169 100644 --- a/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java +++ b/src/main/java/net/sf/javaanpr/intelligence/RecognizedPlate.java @@ -29,7 +29,7 @@ public class RecognizedPlate { private Vector chars; /** - * Constructs a new {@code RecognizedPlate} with no {@code RecognizedChar}s + * Constructs a new {@code RecognizedPlate} with no {@code RecognizedChar}s. */ public RecognizedPlate() { this.chars = new Vector();