Skip to content

Commit 2a67a48

Browse files
committed
doc: update/improve javadocs
Includes changes to in-class content, the addition of overview.html files, and links to 3rd parties for dependency references.
1 parent bb62dee commit 2a67a48

35 files changed

+389
-81
lines changed

module/jsonurl-core/src/main/java/org/jsonurl/JavaValueFactory.java

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@
2525
import java.util.Set;
2626

2727
/**
28-
* A {@link org.jsonurl.ValueFactory ValueFactory} based on J2SE8 data types.
28+
* A {@link org.jsonurl.ValueFactory ValueFactory} based on Java SE data types.
29+
*
30+
* <p>The following singletons are available:
31+
* <ul>
32+
* <li>{@link #PRIMITIVE}
33+
* <li>{@link #DOUBLE}
34+
* <li>{@link #BIGMATH}
35+
* </ul>
2936
*
3037
* @author jsonurl.org
3138
* @author David MacCormack
@@ -42,7 +49,13 @@ public interface JavaValueFactory extends ValueFactory.TransparentBuilder<
4249
String> {
4350

4451
/**
45-
* A singleton instance of {@link JavaValueFactory}.
52+
* A singleton instance of {@link JavaValueFactory} that stores numbers as
53+
* boxed primitives.
54+
*
55+
* <p>This factory uses an instance of {@link java.lang.Long Long} for
56+
* (most) numbers which fall between {@link Long#MIN_VALUE} and
57+
* {@link Long#MAX_VALUE}, and an instance of
58+
* {@link java.lang.Double Double} for everything else.
4659
*/
4760
public static final JavaValueFactory PRIMITIVE = new JavaValueFactory() {
4861

@@ -53,7 +66,8 @@ public Number getNumber(NumberText text) {
5366
};
5467

5568
/**
56-
* A singleton instance of {@link JavaValueFactory}.
69+
* A singleton instance of {@link JavaValueFactory} that uses instances of
70+
* {@link java.lang.Double Double} for all numbers.
5771
*/
5872
public static final JavaValueFactory DOUBLE = new JavaValueFactory() {
5973

@@ -64,7 +78,16 @@ public Number getNumber(NumberText text) {
6478
};
6579

6680
/**
67-
* A singleton instance of {@link JavaValueFactory}.
81+
* A singleton instance of {@link JavaValueFactory} that uses
82+
* {@link java.math.BigInteger BigInteger} and
83+
* {@link java.math.BigDecimal BigDecimal} when necessary.
84+
*
85+
* <p>When using this factory, numbers without fractional parts that are
86+
* too big to be stored in a {@link java.lang.Long Long} will be stored
87+
* in a {@link java.math.BigInteger BigInteger}. Numbers with fractional
88+
* parts that are too big to stored in a {@link java.lang.Double Double}
89+
* will be stored in a {@link java.math.BigDecimal BigDecimal}.
90+
*
6891
*/
6992
public static final JavaValueFactory BIGMATH = new JavaValueFactory() {
7093
@Override

module/jsonurl-core/src/main/java/org/jsonurl/JavaValueParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import java.util.Map;
2222

2323
/**
24-
* A {@link org.jsonurl.Parser Parser} based on J2SE8 data types.
24+
* A {@link org.jsonurl.Parser Parser} based on Java SE data types.
2525
*
2626
* @author jsonurl.org
2727
* @author David MacCormack

module/jsonurl-core/src/main/java/org/jsonurl/JsonUrl.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,8 @@
3434
import java.nio.charset.MalformedInputException;
3535

3636
/**
37-
* The reference implementation of JSON-&gt;URL.
38-
*
39-
* <p>This class provides static methods for performing a number of
40-
* actions on JSON-&gt;URL text.
37+
* This class provides static methods for performing a number of
38+
* actions on JSON&#x2192;URL text.
4139
*
4240
* @author jsonurl.org
4341
* @author David MacCormack
@@ -75,7 +73,7 @@ private static final int percentDecode(
7573
/**
7674
* parse true, false, and null literals.
7775
*
78-
* @return true if the string matches one of the following JSON-&gt;URL
76+
* @return true if the string matches one of the following JSON&#x2192;URL
7977
* literal values: true, false, null.
8078
*/
8179
@SuppressWarnings("PMD")
@@ -215,7 +213,7 @@ private static final String string(
215213
/**
216214
* parse a literal value.
217215
*
218-
* <p>This will parse a literal value from JSON-&gt;URL text and return
216+
* <p>This will parse a literal value from JSON&#x2192;URL text and return
219217
* it as a java.lang.String (as opposed to a ValueFactory String).
220218
* It will perform input validation and string literal decoding.
221219
*
@@ -260,7 +258,7 @@ static final String literalToJavaString(
260258
/**
261259
* parse a literal value
262260
*
263-
* <p>This will parse a literal value from JSON-&gt;URL text. You may use
261+
* <p>This will parse a literal value from JSON&#x2192;URL text. You may use
264262
* {@link org.jsonurl.JsonUrl#parseLiteralLength(CharSequence, int, int)
265263
* parseLiteralLength} to calculate the stop index.
266264
*

module/jsonurl-core/src/main/java/org/jsonurl/JsonUrlStringBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/**
21-
* A JsonUrlTextAppender that appends JSON-&gt;URL text to a StringBuilder.
21+
* A JsonUrlTextAppender that appends JSON&#x2192;URL text to a StringBuilder.
2222
*
2323
* @author jsonurl.org
2424
* @author David MacCormack

module/jsonurl-core/src/main/java/org/jsonurl/JsonUrlTextAppender.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import java.math.BigInteger;
2323

2424
/**
25-
* A JsonTextBuilder that appends JSON-&gt;URL text to any Appendable.
25+
* A JsonTextBuilder that appends JSON&#x2192;URL text to any Appendable.
2626
* @param <A> Accumulator type
2727
* @param <R> Result type
2828
*
@@ -41,7 +41,7 @@ public abstract class JsonUrlTextAppender<A extends Appendable, R>
4141
/**
4242
* Create a new JsonUrlTextAppender.
4343
*
44-
* @param out JSON-&gt;URL text destination
44+
* @param out JSON&#x2192;URL text destination
4545
*/
4646
public JsonUrlTextAppender(A out) {
4747
this.out = out;

module/jsonurl-core/src/main/java/org/jsonurl/NumberBuilder.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import java.math.BigInteger;
2525

2626
/**
27-
* A NumberBuilder implements the builder pattern for JSON-&gt;URL number literals.
28-
* An instance of this class may be used to parse JSON-&gt;URL number
27+
* A NumberBuilder implements the builder pattern for JSON&#x2192;URL number literals.
28+
* An instance of this class may be used to parse JSON&#x2192;URL number
2929
* literals from text as Java SE values.
3030
*
3131
* <h2>Single Use</h2>
@@ -388,7 +388,7 @@ public boolean parse(CharSequence s, int start, int stop) {
388388
}
389389

390390
/**
391-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
391+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
392392
*
393393
*<p>Convenience for {@link #isNumber(CharSequence, int, int, boolean)
394394
* isNumber(s, 0, s.length(), false)}.
@@ -398,7 +398,7 @@ public static boolean isNumber(CharSequence s) {
398398
}
399399

400400
/**
401-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
401+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
402402
*
403403
*<p>Convenience for {@link #isNumber(CharSequence, int, int, boolean)
404404
* isNumber(s, 0, s.length(), isInteger)}.
@@ -408,26 +408,26 @@ public static boolean isNumber(CharSequence s, boolean isInteger) {
408408
}
409409

410410
/**
411-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
411+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
412412
*
413413
* <p>Convenience for {@link #isNumber(CharSequence, int, int, boolean)}
414414
* isNumber(s, 0, stop, false)}.
415415
* @param s a valid CharSequence
416416
* @param start an index
417417
* @param stop an index
418-
* @return true if the CharSequence is a JSON-&gt;URL number
418+
* @return true if the CharSequence is a JSON&#x2192;URL number
419419
*/
420420
public static boolean isNumber(CharSequence s, int start, int stop) {
421421
return isNumber(s, start, stop, false);
422422
}
423423

424424
/**
425-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
425+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
426426
*
427427
* @param s a valid CharSequence
428428
* @param start an index
429429
* @param stop an index
430-
* @return true if the CharSequence is a JSON-&gt;URL number
430+
* @return true if the CharSequence is a JSON&#x2192;URL number
431431
*/
432432
@SuppressWarnings("PMD")
433433
public static boolean isNumber(
@@ -494,17 +494,17 @@ public static boolean isNumber(
494494
}
495495

496496
/**
497-
* Determine if this text represents a valid JSON-&gt;URL number literal.
497+
* Determine if this text represents a valid JSON&#x2192;URL number literal.
498498
*
499499
* <p>This is the result of calling {@link #parse(CharSequence, int, int)}.
500-
* @return true if this text represents is a JSON-&gt;URL number literal
500+
* @return true if this text represents is a JSON&#x2192;URL number literal
501501
*/
502502
public boolean isNumber() {
503503
return this.intIndexStop > this.intIndexStart;
504504
}
505505

506506
/**
507-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
507+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
508508
*
509509
*<p>Convenience for {@link #isNumber(CharSequence, int, int, boolean)
510510
* isNumber(s, 0, s.length(), true)}.
@@ -514,7 +514,7 @@ public static boolean isInteger(CharSequence s) {
514514
}
515515

516516
/**
517-
* Determine if the given CharSequence is a valid JSON-&gt;URL number literal.
517+
* Determine if the given CharSequence is a valid JSON&#x2192;URL number literal.
518518
*
519519
*<p>Convenience for {@link #isNumber(CharSequence, int, int, boolean)
520520
* isNumber(s, start, stop, true)}.

module/jsonurl-core/src/main/java/org/jsonurl/NumberText.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/**
21-
* NumberText provides access to a parsed JSON-&gt;URL number literal.
21+
* NumberText provides access to a parsed JSON&#x2192;URL number literal.
2222
*
2323
* <p>The text of a number is broken down into three parts: integer part,
2424
* fractional part, and exponent. These parts may be accessed via start and stop

module/jsonurl-core/src/main/java/org/jsonurl/ParseException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/**
21-
* An exception that occurs while parsing JSON-&gt;URL text.
21+
* An exception that occurs while parsing JSON&#x2192;URL text.
2222
*/
2323
public class ParseException extends RuntimeException {
2424

module/jsonurl-core/src/main/java/org/jsonurl/Parser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
import java.util.Set;
3838

3939
/**
40-
* A JSON-&gt;URL parser.
40+
* A JSON&#x2192;URL text parser.
4141
*
42-
* <p>An instance of this class may be used to parse JSON-&gt;URL text and
42+
* <p>An instance of this class may be used to parse JSON&#x2192;URL text and
4343
* instantiate JVM heap objects. The interface allows you to control the
4444
* types and values of the Objects created.
4545
*
@@ -197,7 +197,7 @@ public J parseObject(CharSequence s) {
197197
/**
198198
* Parse a character sequence.
199199
*
200-
* <p>Parse the given JSON-&gt;URL text and return an object.
200+
* <p>Parse the given JSON&#x2192;URL text and return an object.
201201
* @param s the text to be parsed
202202
* @param off offset of the first character to be parsed
203203
* @param length the number of characters to be parsed
@@ -223,7 +223,7 @@ public A parseArray(CharSequence s) {
223223
/**
224224
* Parse a character sequence.
225225
*
226-
* <p>Parse the given JSON-&gt;URL text and return an array.
226+
* <p>Parse the given JSON&#x2192;URL text and return an array.
227227
* @param s the text to be parsed
228228
* @param off offset of the first character to be parsed
229229
* @param length the number of characters to be parsed
@@ -248,7 +248,7 @@ public V parse(CharSequence s) {
248248
/**
249249
* Parse a character sequence.
250250
*
251-
* <p>Parse the given JSON-&gt;URL text and return a typed value.
251+
* <p>Parse the given JSON&#x2192;URL text and return a typed value.
252252
* @param s the text to be parsed
253253
* @param off offset of the first character to be parsed
254254
* @param length the number of characters to be parsed
@@ -279,7 +279,7 @@ public V parse(CharSequence s, ValueType canReturn) {
279279
/**
280280
* Parse a character sequence.
281281
*
282-
* <p>Parse the given JSON-&gt;URL text and return a typed value.
282+
* <p>Parse the given JSON&#x2192;URL text and return a typed value.
283283
* @param s the text to be parsed
284284
* @param off offset of the first character to be parsed
285285
* @param length the number of characters to be parsed

module/jsonurl-core/src/main/java/org/jsonurl/SyntaxException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
*/
1919

2020
/**
21-
* A syntax error in JSON-&gt;URL text.
21+
* A syntax error in JSON&#x2192;URL text.
2222
*/
2323
public class SyntaxException extends ParseException {
2424

0 commit comments

Comments
 (0)