8341064: Define anchor point and index term for "wrapper classes"

Reviewed-by: prappo, liach
This commit is contained in:
Joe Darcy 2024-09-30 16:13:35 +00:00
parent 4168faf54c
commit 5586f83e34
10 changed files with 67 additions and 56 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -25,35 +25,42 @@
/**
* Provides classes that are fundamental to the design of the Java
* programming language. The most important classes are {@code
* Object}, which is the root of the class hierarchy, and {@code
* programming language. The most important classes are {@link
* Object}, which is the root of the class hierarchy, and {@link
* Class}, instances of which represent classes at run time.
*
* <p>Frequently it is necessary to represent a value of primitive
* type as if it were an object. The wrapper classes {@code Boolean},
* {@code Character}, {@code Integer}, {@code Long}, {@code Float},
* and {@code Double} serve this purpose. An object of type {@code
* Double}, for example, contains a field whose type is double,
* representing that value in such a way that a reference to it can be
* stored in a variable of reference type. These classes also provide
* a number of methods for converting among primitive values, as well
* as supporting such standard methods as equals and hashCode. The
* {@code Void} class is a non-instantiable class that holds a
* reference to a {@code Class} object representing the type void.
* type as if it were an object.The <dfn id=wrapperClasses>{@index
* "wrapper classes"}</dfn> {@link Boolean}, {@link Byte}, {@link
* Character}, {@link Short}, {@link Integer}, {@link Long}, {@link
* Float}, and {@link Double} serve this purpose. An object of type
* {@code Double}, for example, contains a field whose type is {@code
* double}, representing that value in such a way that a reference to
* it can be stored in a variable of reference type. As discussed in
* <cite>The Java Language Specification</cite>, the wrapper classes
* are involved in boxing (JLS {@jls 5.1.7}) and unboxing (JLS {@jls
* 5.1.8}) conversions. These classes provide a number of methods for
* converting among primitive values, as well as methods supporting
* such standard functionality as {@code equals} and {@code hashCode}.
* The {@link Void} class is a non-instantiable class that holds a
* reference to a {@code Class} object representing the type {@code
* void}.
*
* <p>The class {@code Math} provides commonly used mathematical
* functions such as sine, cosine, and square root. The classes {@code
* String}, {@code StringBuffer}, and {@code StringBuilder} similarly
* provide commonly used operations on character strings.
* <p>The class {@link Math} provides commonly used mathematical
* functions such as {@linkplain Math#sin(double) sine}, {@linkplain
* Math#cos(double) cosine}, and {@linkplain Math#sqrt(double) square
* root}. The classes {@link String}, {@link StringBuffer}, and {@link
* StringBuilder} similarly provide commonly used operations on
* character strings.
*
* <p>Classes {@code ClassLoader}, {@code Process}, {@code
* ProcessBuilder}, {@code Runtime}, {@code SecurityManager}, and
* {@code System} provide "system operations" that manage the dynamic
* <p>Classes {@link ClassLoader}, {@link Process}, {@link
* ProcessBuilder}, {@link Runtime}, {@link SecurityManager}, and
* {@link System} provide "system operations" that manage the dynamic
* loading of classes, creation of external processes, host
* environment inquiries such as the time of day, and enforcement of
* security policies.
*
* <p>Class {@code Throwable} encompasses objects that may be thrown
* <p>Class {@link Throwable} encompasses objects that may be thrown
* by the {@code throw} statement. Subclasses of {@code Throwable}
* represent errors and exceptions.
*