", re.IGNORECASE)
+
+ANY_TAG_RE = re.compile(r"?[^>]+>")
+
+PARAM_RE = re.compile(r"^@param\s+(\S+)\s*(.*)$")
+RET_RE = re.compile(r"^@return\s*(.*)$")
+THROWS_RE = re.compile(r"^@(throws|exception)\s+(\S+)\s*(.*)$")
+SEE_RE = re.compile(r"^@see\s*(.*)$")
+SINCE_RE = re.compile(r"^@since\s*(.*)$")
+DEPR_RE = re.compile(r"^@deprecated\s*(.*)$")
+
+
+def escape_backticks(s: str) -> str:
+ return f"`{s}`" if "`" not in s else f"``{s}``"
+
+
+def replace_inline_javadoc_tags(text: str) -> str:
+ def repl_code(m: re.Match) -> str:
+ return escape_backticks(html.unescape(m.group(1).strip()))
+
+ def repl_literal(m: re.Match) -> str:
+ return html.unescape(m.group(1).strip())
+
+ def repl_link(m: re.Match) -> str:
+ inner = m.group(1).strip()
+ parts = inner.split()
+ if len(parts) >= 2:
+ label = " ".join(parts[1:])
+ return escape_backticks(html.unescape(label))
+ return escape_backticks(html.unescape(parts[0]))
+
+ text = CODE_RE.sub(repl_code, text)
+ text = LITERAL_RE.sub(repl_literal, text)
+ text = LINK_RE.sub(repl_link, text)
+ return text
+
+
+def convert_html_to_markdown(text: str) -> str:
+ def repl_pre(m: re.Match) -> str:
+ inner = m.group(1).strip("\n\r")
+ inner = CODE_TAG_RE.sub(lambda mm: mm.group(1), inner)
+ inner = html.unescape(inner).strip("\n\r")
+ return f"\n```java\n{inner}\n```\n"
+
+ text = PRE_RE.sub(repl_pre, text)
+
+ def repl_code_tag(m: re.Match) -> str:
+ inner = html.unescape(m.group(1).strip())
+ inner = re.sub(r"\s+", " ", inner).strip()
+ return escape_backticks(inner)
+
+ text = CODE_TAG_RE.sub(repl_code_tag, text)
+
+ def repl_a(m: re.Match) -> str:
+ href = m.group(1).strip()
+ label = re.sub(r"\s+", " ", html.unescape(m.group(2)).strip())
+ return f"[{label}]({href})"
+
+ text = A_TAG_RE.sub(repl_a, text)
+
+ text = B_OPEN_RE.sub("**", text)
+ text = B_CLOSE_RE.sub("**", text)
+ text = I_OPEN_RE.sub("*", text)
+ text = I_CLOSE_RE.sub("*", text)
+
+ text = BR_RE.sub("\n", text)
+ text = P_OPEN_RE.sub("\n\n", text)
+ text = P_CLOSE_RE.sub("\n\n", text)
+
+ text = UL_OPEN_RE.sub("\n", text)
+ text = UL_CLOSE_RE.sub("\n", text)
+ text = OL_OPEN_RE.sub("\n", text)
+ text = OL_CLOSE_RE.sub("\n", text)
+ text = LI_OPEN_RE.sub("\n- ", text)
+ text = LI_CLOSE_RE.sub("", text)
+
+ text = ANY_TAG_RE.sub("", text)
+ text = html.unescape(text)
+ text = re.sub(r"\n{3,}", "\n\n", text)
+ return text.strip()
+
+
+def parse_block_tags(lines: List[str]) -> Tuple[List[str], Dict[str, List[Tuple[str, str]]], Dict[str, str]]:
+ main: List[str] = []
+ params: List[Tuple[str, str]] = []
+ throws: List[Tuple[str, str]] = []
+ see: List[Tuple[str, str]] = []
+ singles: Dict[str, str] = {}
+
+ i = 0
+ n = len(lines)
+
+ def read_continuation(start_i: int) -> Tuple[str, int]:
+ parts: List[str] = []
+ j = start_i
+ while j < n:
+ s = lines[j]
+ if j == start_i:
+ parts.append(s)
+ j += 1
+ continue
+ if s.strip() == "":
+ parts.append(s)
+ j += 1
+ continue
+ if s.lstrip().startswith("@"):
+ break
+ parts.append(s)
+ j += 1
+ joined = "\n".join(parts).strip()
+ joined = re.sub(r"\n{3,}", "\n\n", joined)
+ return joined, j
+
+ while i < n:
+ line = lines[i]
+ stripped = line.lstrip()
+
+ if stripped.startswith("@"):
+ if PARAM_RE.match(stripped):
+ name = PARAM_RE.match(stripped).group(1)
+ blob, i2 = read_continuation(i)
+ desc = PARAM_RE.sub(r"\2", blob, count=1).strip()
+ params.append((name, desc))
+ i = i2
+ continue
+
+ if THROWS_RE.match(stripped):
+ exc = THROWS_RE.match(stripped).group(2)
+ blob, i2 = read_continuation(i)
+ desc = THROWS_RE.sub(r"\3", blob, count=1).strip()
+ throws.append((exc, desc))
+ i = i2
+ continue
+
+ if RET_RE.match(stripped):
+ blob, i2 = read_continuation(i)
+ singles["return"] = RET_RE.sub(r"\1", blob, count=1).strip()
+ i = i2
+ continue
+
+ if SEE_RE.match(stripped):
+ blob, i2 = read_continuation(i)
+ see.append((SEE_RE.sub(r"\1", blob, count=1).strip(), ""))
+ i = i2
+ continue
+
+ if SINCE_RE.match(stripped):
+ blob, i2 = read_continuation(i)
+ singles["since"] = SINCE_RE.sub(r"\1", blob, count=1).strip()
+ i = i2
+ continue
+
+ if DEPR_RE.match(stripped):
+ blob, i2 = read_continuation(i)
+ singles["deprecated"] = DEPR_RE.sub(r"\1", blob, count=1).strip()
+ i = i2
+ continue
+
+ blob, i2 = read_continuation(i)
+ main.append(blob)
+ i = i2
+ continue
+
+ main.append(line)
+ i += 1
+
+ return main, {"params": params, "throws": throws, "see": see}, singles
+
+
+def build_markdown(main_text: str, lists: Dict[str, List[Tuple[str, str]]], singles: Dict[str, str]) -> str:
+ parts: List[str] = []
+ if main_text.strip():
+ parts.append(main_text.strip())
+
+ params = lists.get("params") or []
+ throws = lists.get("throws") or []
+ see = lists.get("see") or []
+
+ if params:
+ parts.append("#### Parameters")
+ for name, desc in params:
+ parts.append(f"- `{name}`: {desc.strip()}" if desc.strip() else f"- `{name}`")
+
+ if "return" in singles and singles["return"].strip():
+ parts.append("#### Returns")
+ parts.append(singles["return"].strip())
+
+ if throws:
+ parts.append("#### Throws")
+ for exc, desc in throws:
+ parts.append(f"- `{exc}`: {desc.strip()}" if desc.strip() else f"- `{exc}`")
+
+ if "since" in singles and singles["since"].strip():
+ parts.append("#### Since")
+ parts.append(singles["since"].strip())
+
+ if "deprecated" in singles and singles["deprecated"].strip():
+ parts.append("#### Deprecated")
+ parts.append(singles["deprecated"].strip())
+
+ if see:
+ parts.append("#### See also")
+ for item, _ in see:
+ item = item.strip()
+ if item:
+ parts.append(f"- {item}")
+
+ out = "\n\n".join(p.strip() for p in parts if p.strip())
+ out = re.sub(r"\n{3,}", "\n\n", out).strip()
+ return out
+
+
+def cleanup_markdown_indentation(md: str) -> str:
+ """
+ Remove accidental 4+ leading spaces on prose lines outside fenced code blocks.
+ This fixes cases where old JavaDoc indentation becomes Markdown code blocks.
+ """
+ lines = md.replace("\r\n", "\n").replace("\r", "\n").split("\n")
+ out: List[str] = []
+ in_fence = False
+
+ for line in lines:
+ stripped = line.lstrip()
+
+ if stripped.startswith("```"):
+ in_fence = not in_fence
+ out.append(line)
+ continue
+
+ if in_fence:
+ out.append(line)
+ continue
+
+ if line.startswith(" "):
+ out.append(line.lstrip())
+ else:
+ out.append(line)
+
+ text = "\n".join(out)
+ text = re.sub(r"\n{3,}", "\n\n", text)
+ return text.strip()
+
+
+def convert_legacy_javadoc_to_md(raw: str) -> str:
+ raw = replace_inline_javadoc_tags(raw)
+ raw = convert_html_to_markdown(raw)
+
+ lines = raw.splitlines()
+ main_lines, lists, singles = parse_block_tags(lines)
+
+ main_text = "\n".join(main_lines).strip()
+ out = build_markdown(main_text, lists, singles)
+ out = cleanup_markdown_indentation(out)
+ return "\n".join(ln.rstrip() for ln in out.splitlines()).strip()
+
+
+# -----------------------------
+# Emit Java 25 /// comments
+# -----------------------------
+
+def render_triple_slash_doc(md: str, indent: str) -> str:
+ lines = md.replace("\r\n", "\n").replace("\r", "\n").split("\n")
+ if lines == [""]:
+ return f"{indent}///"
+
+ out: List[str] = []
+ for ln in lines:
+ if ln == "":
+ out.append(f"{indent}///")
+ else:
+ out.append(f"{indent}/// {ln}")
+ return "\n".join(out)
+
+
+# -----------------------------
+# File conversion
+# -----------------------------
+
+def convert_file_in_place(path: Path, dry_run: bool = False) -> bool:
+ try:
+ src = path.read_text(encoding="utf-8")
+ except UnicodeDecodeError:
+ return False
+
+ blocks = find_javadoc_blocks(src)
+ if not blocks:
+ return False
+
+ out = src
+
+ for start, end in reversed(blocks):
+ replace_start, indent = line_start_and_indent(out, start)
+
+ legacy_block = out[start:end]
+ normalized = legacy_block.replace("\r\n", "\n").replace("\r", "\n")
+
+ header_idx = normalized.find("/**")
+ if header_idx == -1:
+ continue
+
+ inner_body = normalized[header_idx + 3 : -2]
+ raw_content = strip_javadoc_stars(inner_body)
+
+ md = convert_legacy_javadoc_to_md(raw_content)
+ triple = render_triple_slash_doc(md, indent)
+
+ out = out[:replace_start] + triple + out[end:]
+
+ if out != src:
+ if not dry_run:
+ path.write_text(out, encoding="utf-8", newline="\n")
+ return True
+
+ return False
+
+
+# -----------------------------
+# Main
+# -----------------------------
+
+def main() -> None:
+ ap = argparse.ArgumentParser(
+ description="Convert legacy /** ... */ JavaDoc to Java 25 /// Markdown doc comments."
+ )
+ ap.add_argument("root", help="Root directory or single .java file")
+ ap.add_argument("--include", action="append", default=["**/*.java"], help='Include glob(s), default: "**/*.java"')
+ ap.add_argument("--exclude", action="append", default=[], help='Exclude glob(s), e.g. "**/build/**"')
+ ap.add_argument("--dry-run", action="store_true", help="Report changes but do not write files")
+ args = ap.parse_args()
+
+ root = Path(args.root)
+
+ scanned = 0
+ changed = 0
+
+ for f in iter_files(root, args.include, args.exclude):
+ scanned += 1
+ if convert_file_in_place(f, args.dry_run):
+ changed += 1
+ print(f"CHANGED: {f}")
+
+ if args.dry_run:
+ print(f"\nDry run complete. Scanned {scanned} file(s), would change {changed}.")
+ else:
+ print(f"\nDone. Scanned {scanned} file(s), changed {changed}.")
+
+
+if __name__ == "__main__":
+ main()
\ No newline at end of file
diff --git a/Ports/CLDC11/src/java/io/ByteArrayInputStream.java b/Ports/CLDC11/src/java/io/ByteArrayInputStream.java
index 33d7362986..46e921b6de 100644
--- a/Ports/CLDC11/src/java/io/ByteArrayInputStream.java
+++ b/Ports/CLDC11/src/java/io/ByteArrayInputStream.java
@@ -22,104 +22,74 @@
* have any questions.
*/
package java.io;
-/**
- * A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.
- * Since: JDK1.0, CLDC 1.0
- */
+/// A ByteArrayInputStream contains an internal buffer that contains bytes that may be read from the stream. An internal counter keeps track of the next byte to be supplied by the read method.
+/// Since: JDK1.0, CLDC 1.0
public class ByteArrayInputStream extends java.io.InputStream{
- /**
- * An array of bytes that was provided by the creator of the stream. Elements buf[0] through buf[count-1] are the only bytes that can ever be read from the stream; element buf[pos] is the next byte to be read.
- */
+ /// An array of bytes that was provided by the creator of the stream. Elements buf[0] through buf[count-1] are the only bytes that can ever be read from the stream; element buf[pos] is the next byte to be read.
protected byte[] buf;
- /**
- * The index one greater than the last valid character in the input stream buffer. This value should always be nonnegative and not larger than the length of buf. It is one greater than the position of the last byte within buf that can ever be read from the input stream buffer.
- */
+ /// The index one greater than the last valid character in the input stream buffer. This value should always be nonnegative and not larger than the length of buf. It is one greater than the position of the last byte within buf that can ever be read from the input stream buffer.
protected int count;
- /**
- * The currently marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by the mark() method. The current buffer position is set to this point by the reset() method.
- * Since: JDK1.1
- */
+ /// The currently marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by the mark() method. The current buffer position is set to this point by the reset() method.
+ /// Since: JDK1.1
protected int mark;
- /**
- * The index of the next character to read from the input stream buffer. This value should always be nonnegative and not larger than the value of count. The next byte to be read from the input stream buffer will be buf[pos].
- */
+ /// The index of the next character to read from the input stream buffer. This value should always be nonnegative and not larger than the value of count. The next byte to be read from the input stream buffer will be buf[pos].
protected int pos;
- /**
- * Creates a ByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied. The initial value of pos is 0 and the initial value of count is the length of buf.
- * buf - the input buffer.
- */
+ /// Creates a ByteArrayInputStream so that it uses buf as its buffer array. The buffer array is not copied. The initial value of pos is 0 and the initial value of count is the length of buf.
+ /// buf - the input buffer.
public ByteArrayInputStream(byte[] buf){
//TODO codavaj!!
}
- /**
- * Creates ByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is offset+length. The buffer array is not copied.
- * Note that if bytes are simply read from the resulting input stream, elements buf[pos] through buf[pos+len-1] will be read; however, if a reset operation is performed, then bytes buf[0] through buf[pos-1] will then become available for input.
- * buf - the input buffer.offset - the offset in the buffer of the first byte to read.length - the maximum number of bytes to read from the buffer.
- */
+ /// Creates ByteArrayInputStream that uses buf as its buffer array. The initial value of pos is offset and the initial value of count is offset+length. The buffer array is not copied.
+ /// Note that if bytes are simply read from the resulting input stream, elements buf[pos] through buf[pos+len-1] will be read; however, if a reset operation is performed, then bytes buf[0] through buf[pos-1] will then become available for input.
+ /// buf - the input buffer.offset - the offset in the buffer of the first byte to read.length - the maximum number of bytes to read from the buffer.
public ByteArrayInputStream(byte[] buf, int offset, int length){
//TODO codavaj!!
}
- /**
- * Returns the number of bytes that can be read from this input stream without blocking. The value returned is count
- * - pos, which is the number of bytes remaining to be read from the input buffer.
- */
+ /// Returns the number of bytes that can be read from this input stream without blocking. The value returned is count
+ /// - pos, which is the number of bytes remaining to be read from the input buffer.
public int available(){
return 0; //TODO codavaj!!
}
- /**
- * Closes this input stream and releases any system resources associated with the stream.
- */
+ /// Closes this input stream and releases any system resources associated with the stream.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Set the current marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by this method.
- */
+ /// Set the current marked position in the stream. ByteArrayInputStream objects are marked at position zero by default when constructed. They may be marked at another position within the buffer by this method.
public void mark(int readAheadLimit){
return; //TODO codavaj!!
}
- /**
- * Tests if ByteArrayInputStream supports mark/reset.
- */
+ /// Tests if ByteArrayInputStream supports mark/reset.
public boolean markSupported(){
return false; //TODO codavaj!!
}
- /**
- * Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned.
- * This read method cannot block.
- */
+ /// Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned.
+ /// This read method cannot block.
public int read(){
return 0; //TODO codavaj!!
}
- /**
- * Reads up to len bytes of data into an array of bytes from this input stream. If pos equals count, then -1 is returned to indicate end of file. Otherwise, the number k of bytes read is equal to the smaller of len and count-pos. If k is positive, then bytes buf[pos] through buf[pos+k-1] are copied into b[off] through b[off+k-1] in the manner performed by System.arraycopy. The value k is added into pos and k is returned.
- * This read method cannot block.
- */
+ /// Reads up to len bytes of data into an array of bytes from this input stream. If pos equals count, then -1 is returned to indicate end of file. Otherwise, the number k of bytes read is equal to the smaller of len and count-pos. If k is positive, then bytes buf[pos] through buf[pos+k-1] are copied into b[off] through b[off+k-1] in the manner performed by System.arraycopy. The value k is added into pos and k is returned.
+ /// This read method cannot block.
public int read(byte[] b, int off, int len){
return 0; //TODO codavaj!!
}
- /**
- * Resets the buffer to the marked position. The marked position is the beginning unless another position was marked. The value of pos is set to 0.
- */
+ /// Resets the buffer to the marked position. The marked position is the beginning unless another position was marked. The value of pos is set to 0.
public void reset(){
return; //TODO codavaj!!
}
- /**
- * Skips n bytes of input from this input stream. Fewer bytes might be skipped if the end of the input stream is reached. The actual number k of bytes to be skipped is equal to the smaller of n and count-pos. The value k is added into pos and k is returned.
- */
+ /// Skips n bytes of input from this input stream. Fewer bytes might be skipped if the end of the input stream is reached. The actual number k of bytes to be skipped is equal to the smaller of n and count-pos. The value k is added into pos and k is returned.
public long skip(long n){
return 0l; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/ByteArrayOutputStream.java b/Ports/CLDC11/src/java/io/ByteArrayOutputStream.java
index 17148f9c72..f03c1ddb04 100644
--- a/Ports/CLDC11/src/java/io/ByteArrayOutputStream.java
+++ b/Ports/CLDC11/src/java/io/ByteArrayOutputStream.java
@@ -22,82 +22,58 @@
* have any questions.
*/
package java.io;
-/**
- * This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().
- * Since: JDK1.0, CLDC 1.0
- */
+/// This class implements an output stream in which the data is written into a byte array. The buffer automatically grows as data is written to it. The data can be retrieved using toByteArray() and toString().
+/// Since: JDK1.0, CLDC 1.0
public class ByteArrayOutputStream extends java.io.OutputStream{
- /**
- * The buffer where data is stored.
- */
+ /// The buffer where data is stored.
protected byte[] buf;
- /**
- * The number of valid bytes in the buffer.
- */
+ /// The number of valid bytes in the buffer.
protected int count;
- /**
- * Creates a new byte array output stream. The buffer capacity is initially 32 bytes, though its size increases if necessary.
- */
+ /// Creates a new byte array output stream. The buffer capacity is initially 32 bytes, though its size increases if necessary.
public ByteArrayOutputStream(){
//TODO codavaj!!
}
- /**
- * Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
- * size - the initial size.
- * - if size is negative.
- */
+ /// Creates a new byte array output stream, with a buffer capacity of the specified size, in bytes.
+ /// size - the initial size.
+ /// - if size is negative.
public ByteArrayOutputStream(int size){
//TODO codavaj!!
}
- /**
- * Closes this output stream and releases any system resources associated with this stream. A closed stream cannot perform output operations and cannot be reopened.
- */
+ /// Closes this output stream and releases any system resources associated with this stream. A closed stream cannot perform output operations and cannot be reopened.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the output stream is discarded. The output stream can be used again, reusing the already allocated buffer space.
- */
+ /// Resets the count field of this byte array output stream to zero, so that all currently accumulated output in the output stream is discarded. The output stream can be used again, reusing the already allocated buffer space.
public void reset(){
return; //TODO codavaj!!
}
- /**
- * Returns the current size of the buffer.
- */
+ /// Returns the current size of the buffer.
public int size(){
return 0; //TODO codavaj!!
}
- /**
- * Creates a newly allocated byte array. Its size is the current size of this output stream and the valid contents of the buffer have been copied into it.
- */
+ /// Creates a newly allocated byte array. Its size is the current size of this output stream and the valid contents of the buffer have been copied into it.
public byte[] toByteArray(){
return null; //TODO codavaj!!
}
- /**
- * Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
- */
+ /// Converts the buffer's contents into a string, translating bytes into characters according to the platform's default character encoding.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
- */
+ /// Writes len bytes from the specified byte array starting at offset off to this byte array output stream.
public void write(byte[] b, int off, int len){
return; //TODO codavaj!!
}
- /**
- * Writes the specified byte to this byte array output stream.
- */
+ /// Writes the specified byte to this byte array output stream.
public void write(int b){
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/DataInput.java b/Ports/CLDC11/src/java/io/DataInput.java
index 7219b11868..d6585c7f2b 100644
--- a/Ports/CLDC11/src/java/io/DataInput.java
+++ b/Ports/CLDC11/src/java/io/DataInput.java
@@ -22,100 +22,70 @@
* have any questions.
*/
package java.io;
-/**
- * The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types. There is also a facility for reconstructing a String from data in Java modified UTF-8 format.
- * It is generally true of all the reading routines in this interface that if end of file is reached before the desired number of bytes has been read, an EOFException (which is a kind of IOException) is thrown. If any byte cannot be read for any reason other than end of file, an IOException other than EOFException is thrown. In particular, an IOException may be thrown if the input stream has been closed.
- * Since: JDK1.0, CLDC 1.0 See Also:DataInputStream, DataOutput
- */
+/// The DataInput interface provides for reading bytes from a binary stream and reconstructing from them data in any of the Java primitive types. There is also a facility for reconstructing a String from data in Java modified UTF-8 format.
+/// It is generally true of all the reading routines in this interface that if end of file is reached before the desired number of bytes has been read, an EOFException (which is a kind of IOException) is thrown. If any byte cannot be read for any reason other than end of file, an IOException other than EOFException is thrown. In particular, an IOException may be thrown if the input stream has been closed.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataInputStream, DataOutput
public interface DataInput extends AutoCloseable {
- /**
- * Reads one input byte and returns true if that byte is nonzero, false if that byte is zero. This method is suitable for reading the byte written by the writeBoolean method of interface DataOutput.
- */
+ /// Reads one input byte and returns true if that byte is nonzero, false if that byte is zero. This method is suitable for reading the byte written by the writeBoolean method of interface DataOutput.
public abstract boolean readBoolean() throws java.io.IOException;
- /**
- * Reads and returns one input byte. The byte is treated as a signed value in the range -128 through 127, inclusive. This method is suitable for reading the byte written by the writeByte method of interface DataOutput.
- */
+ /// Reads and returns one input byte. The byte is treated as a signed value in the range -128 through 127, inclusive. This method is suitable for reading the byte written by the writeByte method of interface DataOutput.
public abstract byte readByte() throws java.io.IOException;
- /**
- * Reads an input char and returns the char value. A Unicode char is made up of two bytes. Let a be the first byte read and b be the second byte. The value returned is:
- * (char)((a 8) | (b 0xff)) This method is suitable for reading bytes written by the writeChar method of interface DataOutput.
- */
+ /// Reads an input char and returns the char value. A Unicode char is made up of two bytes. Let a be the first byte read and b be the second byte. The value returned is:
+ /// (char)((a 8) | (b 0xff)) This method is suitable for reading bytes written by the writeChar method of interface DataOutput.
public abstract char readChar() throws java.io.IOException;
- /**
- * Reads eight input bytes and returns a double value. It does this by first constructing a long value in exactly the manner of the readlong method, then converting this long value to a double in exactly the manner of the method Double.longBitsToDouble. This method is suitable for reading bytes written by the writeDouble method of interface DataOutput.
- */
+ /// Reads eight input bytes and returns a double value. It does this by first constructing a long value in exactly the manner of the readlong method, then converting this long value to a double in exactly the manner of the method Double.longBitsToDouble. This method is suitable for reading bytes written by the writeDouble method of interface DataOutput.
public abstract double readDouble() throws java.io.IOException;
- /**
- * Reads four input bytes and returns a float value. It does this by first constructing an int value in exactly the manner of the readInt method, then converting this int value to a float in exactly the manner of the method Float.intBitsToFloat. This method is suitable for reading bytes written by the writeFloat method of interface DataOutput.
- */
+ /// Reads four input bytes and returns a float value. It does this by first constructing an int value in exactly the manner of the readInt method, then converting this int value to a float in exactly the manner of the method Float.intBitsToFloat. This method is suitable for reading bytes written by the writeFloat method of interface DataOutput.
public abstract float readFloat() throws java.io.IOException;
- /**
- * Reads some bytes from an input stream and stores them into the buffer array b. The number of bytes read is equal to the length of b.
- * This method blocks until one of the following conditions occurs:
- * b.length bytes of input data are available, in which case a normal return is made. End of file is detected, in which case an EOFException is thrown. An I/O error occurs, in which case an IOException other than EOFException is thrown.
- * If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[0], the next one into b[1], and so on. If an exception is thrown from this method, then it may be that some but not all bytes of b have been updated with data from the input stream.
- */
+ /// Reads some bytes from an input stream and stores them into the buffer array b. The number of bytes read is equal to the length of b.
+ /// This method blocks until one of the following conditions occurs:
+ /// b.length bytes of input data are available, in which case a normal return is made. End of file is detected, in which case an EOFException is thrown. An I/O error occurs, in which case an IOException other than EOFException is thrown.
+ /// If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[0], the next one into b[1], and so on. If an exception is thrown from this method, then it may be that some but not all bytes of b have been updated with data from the input stream.
public abstract void readFully(byte[] b) throws java.io.IOException;
- /**
- * Reads len bytes from an input stream.
- * This method blocks until one of the following conditions occurs:
- * len bytes of input data are available, in which case a normal return is made. End of file is detected, in which case an EOFException is thrown. An I/O error occurs, in which case an IOException other than EOFException is thrown.
- * If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len.
- */
+ /// Reads len bytes from an input stream.
+ /// This method blocks until one of the following conditions occurs:
+ /// len bytes of input data are available, in which case a normal return is made. End of file is detected, in which case an EOFException is thrown. An I/O error occurs, in which case an IOException other than EOFException is thrown.
+ /// If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are read. Otherwise, the first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len.
public abstract void readFully(byte[] b, int off, int len) throws java.io.IOException;
- /**
- * Reads four input bytes and returns an int value. Let a be the first byte read, b be the second byte, c be the third byte, and d be the fourth byte. The value returned is:
- * (((a 0xff) 24) | ((b 0xff) 16) | ((c 0xff) 8) | (d 0xff)) This method is suitable for reading bytes written by the writeInt method of interface DataOutput.
- */
+ /// Reads four input bytes and returns an int value. Let a be the first byte read, b be the second byte, c be the third byte, and d be the fourth byte. The value returned is:
+ /// (((a 0xff) 24) | ((b 0xff) 16) | ((c 0xff) 8) | (d 0xff)) This method is suitable for reading bytes written by the writeInt method of interface DataOutput.
public abstract int readInt() throws java.io.IOException;
- /**
- * Reads eight input bytes and returns a long value. Let a be the first byte read, b be the second byte, c be the third byte, d be the fourth byte, e be the fifth byte, f be the sixth byte, g be the seventh byte, and h be the eighth byte. The value returned is:
- * (((long)(a 0xff) 56) | ((long)(b 0xff) 48) | ((long)(c 0xff) 40) | ((long)(d 0xff) 32) | ((long)(e 0xff) 24) | ((long)(f 0xff) 16) | ((long)(g 0xff) 8) | ((long)(h 0xff)))
- * This method is suitable for reading bytes written by the writeLong method of interface DataOutput.
- */
+ /// Reads eight input bytes and returns a long value. Let a be the first byte read, b be the second byte, c be the third byte, d be the fourth byte, e be the fifth byte, f be the sixth byte, g be the seventh byte, and h be the eighth byte. The value returned is:
+ /// (((long)(a 0xff) 56) | ((long)(b 0xff) 48) | ((long)(c 0xff) 40) | ((long)(d 0xff) 32) | ((long)(e 0xff) 24) | ((long)(f 0xff) 16) | ((long)(g 0xff) 8) | ((long)(h 0xff)))
+ /// This method is suitable for reading bytes written by the writeLong method of interface DataOutput.
public abstract long readLong() throws java.io.IOException;
- /**
- * Reads two input bytes and returns a short value. Let a be the first byte read and b be the second byte. The value returned is:
- * (short)((a 8) | (b 0xff)) This method is suitable for reading the bytes written by the writeShort method of interface DataOutput.
- */
+ /// Reads two input bytes and returns a short value. Let a be the first byte read and b be the second byte. The value returned is:
+ /// (short)((a 8) | (b 0xff)) This method is suitable for reading the bytes written by the writeShort method of interface DataOutput.
public abstract short readShort() throws java.io.IOException;
- /**
- * Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255. This method is suitable for reading the byte written by the writeByte method of interface DataOutput if the argument to writeByte was intended to be a value in the range 0 through 255.
- */
+ /// Reads one input byte, zero-extends it to type int, and returns the result, which is therefore in the range 0 through 255. This method is suitable for reading the byte written by the writeByte method of interface DataOutput if the argument to writeByte was intended to be a value in the range 0 through 255.
public abstract int readUnsignedByte() throws java.io.IOException;
- /**
- * Reads two input bytes, zero-extends it to type int, and returns an int value in the range 0 through 65535. Let a be the first byte read and b be the second byte. The value returned is:
- * (((a 0xff) 8) | (b 0xff)) This method is suitable for reading the bytes written by the writeShort method of interface DataOutput if the argument to writeShort was intended to be a value in the range 0 through 65535.
- */
+ /// Reads two input bytes, zero-extends it to type int, and returns an int value in the range 0 through 65535. Let a be the first byte read and b be the second byte. The value returned is:
+ /// (((a 0xff) 8) | (b 0xff)) This method is suitable for reading the bytes written by the writeShort method of interface DataOutput if the argument to writeShort was intended to be a value in the range 0 through 65535.
public abstract int readUnsignedShort() throws java.io.IOException;
- /**
- * Reads in a string that has been encoded using a modified UTF-8 format. The general contract of readUTF is that it reads a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
- * First, two bytes are read and used to construct an unsigned 16-bit integer in exactly the manner of the readUnsignedShort method . This integer value is called the UTF length and specifies the number of additional bytes to be read. These bytes are then converted to characters by considering them in groups. The length of each group is computed from the value of the first byte of the group. The byte following a group, if any, is the first byte of the next group.
- * If the first byte of a group matches the bit pattern 0xxxxxxx (where x means "may be 0 or 1"), then the group consists of just that byte. The byte is zero-extended to form a character.
- * If the first byte of a group matches the bit pattern 110xxxxx, then the group consists of that byte a and a second byte b. If there is no byte b (because byte a was the last of the bytes to be read), or if byte b does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:
- * (char)(((a 0x1F) 6) | (b 0x3F)) If the first byte of a group matches the bit pattern 1110xxxx, then the group consists of that byte a and two more bytes b and c. If there is no byte c (because byte a was one of the last two of the bytes to be read), or either byte b or byte c does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:
- * (char)(((a 0x0F) 12) | ((b 0x3F) 6) | (c 0x3F)) If the first byte of a group matches the pattern 1111xxxx or the pattern 10xxxxxx, then a UTFDataFormatException is thrown.
- * If end of file is encountered at any time during this entire process, then an EOFException is thrown.
- * After every group has been converted to a character by this process, the characters are gathered, in the same order in which their corresponding groups were read from the input stream, to form a String, which is returned.
- * The writeUTF method of interface DataOutput may be used to write data that is suitable for reading by this method.
- */
+ /// Reads in a string that has been encoded using a modified UTF-8 format. The general contract of readUTF is that it reads a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String.
+ /// First, two bytes are read and used to construct an unsigned 16-bit integer in exactly the manner of the readUnsignedShort method . This integer value is called the UTF length and specifies the number of additional bytes to be read. These bytes are then converted to characters by considering them in groups. The length of each group is computed from the value of the first byte of the group. The byte following a group, if any, is the first byte of the next group.
+ /// If the first byte of a group matches the bit pattern 0xxxxxxx (where x means "may be 0 or 1"), then the group consists of just that byte. The byte is zero-extended to form a character.
+ /// If the first byte of a group matches the bit pattern 110xxxxx, then the group consists of that byte a and a second byte b. If there is no byte b (because byte a was the last of the bytes to be read), or if byte b does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:
+ /// (char)(((a 0x1F) 6) | (b 0x3F)) If the first byte of a group matches the bit pattern 1110xxxx, then the group consists of that byte a and two more bytes b and c. If there is no byte c (because byte a was one of the last two of the bytes to be read), or either byte b or byte c does not match the bit pattern 10xxxxxx, then a UTFDataFormatException is thrown. Otherwise, the group is converted to the character:
+ /// (char)(((a 0x0F) 12) | ((b 0x3F) 6) | (c 0x3F)) If the first byte of a group matches the pattern 1111xxxx or the pattern 10xxxxxx, then a UTFDataFormatException is thrown.
+ /// If end of file is encountered at any time during this entire process, then an EOFException is thrown.
+ /// After every group has been converted to a character by this process, the characters are gathered, in the same order in which their corresponding groups were read from the input stream, to form a String, which is returned.
+ /// The writeUTF method of interface DataOutput may be used to write data that is suitable for reading by this method.
public abstract java.lang.String readUTF() throws java.io.IOException;
- /**
- * Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes. However, it may skip over some smaller number of bytes, possibly zero. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. This method never throws an EOFException. The actual number of bytes skipped is returned.
- */
+ /// Makes an attempt to skip over n bytes of data from the input stream, discarding the skipped bytes. However, it may skip over some smaller number of bytes, possibly zero. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. This method never throws an EOFException. The actual number of bytes skipped is returned.
public abstract int skipBytes(int n) throws java.io.IOException;
}
diff --git a/Ports/CLDC11/src/java/io/DataInputStream.java b/Ports/CLDC11/src/java/io/DataInputStream.java
index b1db9c1873..8e0a8a6588 100644
--- a/Ports/CLDC11/src/java/io/DataInputStream.java
+++ b/Ports/CLDC11/src/java/io/DataInputStream.java
@@ -22,211 +22,157 @@
* have any questions.
*/
package java.io;
-/**
- * A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.
- * Since: JDK1.0, CLDC 1.0 See Also:DataOutputStream
- */
+/// A data input stream lets an application read primitive Java data types from an underlying input stream in a machine-independent way. An application uses a data output stream to write data that can later be read by a data input stream.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataOutputStream
public class DataInputStream extends java.io.InputStream implements java.io.DataInput{
- /**
- * The input stream.
- */
+ /// The input stream.
protected java.io.InputStream in;
- /**
- * Creates a DataInputStream and saves its argument, the input stream in, for later use.
- * in - the input stream.
- */
+ /// Creates a DataInputStream and saves its argument, the input stream in, for later use.
+ /// in - the input stream.
public DataInputStream(java.io.InputStream in){
//TODO codavaj!!
}
- /**
- * Returns the number of bytes that can be read from this input stream without blocking.
- * This method simply performs in.available() and returns the result.
- */
+ /// Returns the number of bytes that can be read from this input stream without blocking.
+ /// This method simply performs in.available() and returns the result.
public int available() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close().
- */
+ /// Closes this input stream and releases any system resources associated with the stream. This method simply performs in.close().
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
- * The readlimit argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
- * This method simply performs in.mark(readlimit).
- */
+ /// Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
+ /// The readlimit argument tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
+ /// This method simply performs in.mark(readlimit).
public void mark(int readlimit){
return; //TODO codavaj!!
}
- /**
- * Tests if this input stream supports the mark and reset methods. This method simply performs in.markSupported().
- */
+ /// Tests if this input stream supports the mark and reset methods. This method simply performs in.markSupported().
public boolean markSupported(){
return false; //TODO codavaj!!
}
- /**
- * Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
- * This method simply performs in.read() and returns the result.
- */
+ /// Reads the next byte of data from this input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
+ /// This method simply performs in.read() and returns the result.
public int read() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the read method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the read method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final int read(byte[] b) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
- * This method simply performs in.read(b, off, len) and returns the result.
- */
+ /// Reads up to len bytes of data from this input stream into an array of bytes. This method blocks until some input is available.
+ /// This method simply performs in.read(b, off, len) and returns the result.
public final int read(byte[] b, int off, int len) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readBoolean method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readBoolean method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final boolean readBoolean() throws java.io.IOException{
return false; //TODO codavaj!!
}
- /**
- * See the general contract of the readByte method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readByte method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final byte readByte() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readChar method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readChar method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final char readChar() throws java.io.IOException{
return ' '; //TODO codavaj!!
}
- /**
- * See the general contract of the readDouble method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readDouble method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final double readDouble() throws java.io.IOException{
return 0.0d; //TODO codavaj!!
}
- /**
- * See the general contract of the readFloat method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readFloat method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final float readFloat() throws java.io.IOException{
return 0.0f; //TODO codavaj!!
}
- /**
- * See the general contract of the readFully method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readFully method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final void readFully(byte[] b) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * See the general contract of the readFully method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readFully method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final void readFully(byte[] b, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * See the general contract of the readInt method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readInt method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final int readInt() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readLong method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readLong method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final long readLong() throws java.io.IOException{
return 0l; //TODO codavaj!!
}
- /**
- * See the general contract of the readShort method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readShort method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final short readShort() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readUnsignedByte method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readUnsignedByte method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final int readUnsignedByte() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readUnsignedShort method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readUnsignedShort method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final int readUnsignedShort() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * See the general contract of the readUTF method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the readUTF method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final java.lang.String readUTF() throws java.io.IOException{
return null; //TODO codavaj!!
}
- /**
- * Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String. The details of the modified UTF-8 representation are exactly the same as for the readUTF method of DataInput.
- */
+ /// Reads from the stream in a representation of a Unicode character string encoded in Java modified UTF-8 format; this string of characters is then returned as a String. The details of the modified UTF-8 representation are exactly the same as for the readUTF method of DataInput.
public static final java.lang.String readUTF(java.io.DataInput in) throws java.io.IOException{
return null; //TODO codavaj!!
}
- /**
- * Repositions this stream to the position at the time the mark method was last called on this input stream.
- * This method simply performs in.reset().
- * Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.
- */
+ /// Repositions this stream to the position at the time the mark method was last called on this input stream.
+ /// This method simply performs in.reset().
+ /// Stream marks are intended to be used in situations where you need to read ahead a little to see what's in the stream. Often this is most easily done by invoking some general parser. If the stream is of the type handled by the parse, it just chugs along happily. If the stream is not of that type, the parser should toss an exception when it fails. If this happens within readlimit bytes, it allows the outer code to reset the stream and try another parser.
public void reset() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.
- * This method simply performs in.skip(n).
- */
+ /// Skips over and discards n bytes of data from the input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. The actual number of bytes skipped is returned.
+ /// This method simply performs in.skip(n).
public long skip(long n) throws java.io.IOException{
return 0l; //TODO codavaj!!
}
- /**
- * See the general contract of the skipBytes method of DataInput.
- * Bytes for this operation are read from the contained input stream.
- */
+ /// See the general contract of the skipBytes method of DataInput.
+ /// Bytes for this operation are read from the contained input stream.
public final int skipBytes(int n) throws java.io.IOException{
return 0; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/DataOutput.java b/Ports/CLDC11/src/java/io/DataOutput.java
index 3cbe73914e..41ae0ec070 100644
--- a/Ports/CLDC11/src/java/io/DataOutput.java
+++ b/Ports/CLDC11/src/java/io/DataOutput.java
@@ -22,91 +22,63 @@
* have any questions.
*/
package java.io;
-/**
- * The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream. There is also a facility for converting a String into Java modified UTF-8 format and writing the resulting series of bytes.
- * For all the methods in this interface that write bytes, it is generally true that if a byte cannot be written for any reason, an IOException is thrown.
- * Since: JDK1.0, CLDC 1.0 See Also:DataInput, DataOutputStream
- */
+/// The DataOutput interface provides for converting data from any of the Java primitive types to a series of bytes and writing these bytes to a binary stream. There is also a facility for converting a String into Java modified UTF-8 format and writing the resulting series of bytes.
+/// For all the methods in this interface that write bytes, it is generally true that if a byte cannot be written for any reason, an IOException is thrown.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataInput, DataOutputStream
public interface DataOutput extends AutoCloseable {
- /**
- * Writes to the output stream all the bytes in array b. If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are written. Otherwise, the byte b[0] is written first, then b[1], and so on; the last byte written is b[b.length-1].
- */
+ /// Writes to the output stream all the bytes in array b. If b is null, a NullPointerException is thrown. If b.length is zero, then no bytes are written. Otherwise, the byte b[0] is written first, then b[1], and so on; the last byte written is b[b.length-1].
public abstract void write(byte[] b) throws java.io.IOException;
- /**
- * Writes len bytes from array b, in order, to the output stream. If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are written. Otherwise, the byte b[off] is written first, then b[off+1], and so on; the last byte written is b[off+len-1].
- */
+ /// Writes len bytes from array b, in order, to the output stream. If b is null, a NullPointerException is thrown. If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown. If len is zero, then no bytes are written. Otherwise, the byte b[off] is written first, then b[off+1], and so on; the last byte written is b[off+len-1].
public abstract void write(byte[] b, int off, int len) throws java.io.IOException;
- /**
- * Writes to the output stream the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
- */
+ /// Writes to the output stream the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
public abstract void write(int b) throws java.io.IOException;
- /**
- * Writes a boolean value to this output stream. If the argument v is true, the value (byte)1 is written; if v is false, the value (byte)0 is written. The byte written by this method may be read by the readBoolean method of interface DataInput, which will then return a boolean equal to v.
- */
+ /// Writes a boolean value to this output stream. If the argument v is true, the value (byte)1 is written; if v is false, the value (byte)0 is written. The byte written by this method may be read by the readBoolean method of interface DataInput, which will then return a boolean equal to v.
public abstract void writeBoolean(boolean v) throws java.io.IOException;
- /**
- * Writes to the output stream the eight low- order bits of the argument v. The 24 high-order bits of v are ignored. (This means that writeByte does exactly the same thing as write for an integer argument.) The byte written by this method may be read by the readByte method of interface DataInput, which will then return a byte equal to (byte)v.
- */
+ /// Writes to the output stream the eight low- order bits of the argument v. The 24 high-order bits of v are ignored. (This means that writeByte does exactly the same thing as write for an integer argument.) The byte written by this method may be read by the readByte method of interface DataInput, which will then return a byte equal to (byte)v.
public abstract void writeByte(int v) throws java.io.IOException;
- /**
- * Writes a char value, which is comprised of two bytes, to the output stream. The byte values to be written, in the order shown, are:
- * (byte)(0xff (v 8)) (byte)(0xff v)
- * The bytes written by this method may be read by the readChar method of interface DataInput, which will then return a char equal to (char)v.
- */
+ /// Writes a char value, which is comprised of two bytes, to the output stream. The byte values to be written, in the order shown, are:
+ /// (byte)(0xff (v 8)) (byte)(0xff v)
+ /// The bytes written by this method may be read by the readChar method of interface DataInput, which will then return a char equal to (char)v.
public abstract void writeChar(int v) throws java.io.IOException;
- /**
- * Writes every character in the string s, to the output stream, in order, two bytes per character. If s is null, a NullPointerException is thrown. If s.length is zero, then no characters are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, two bytes are actually written, high-order byte first, in exactly the manner of the writeChar method.
- */
+ /// Writes every character in the string s, to the output stream, in order, two bytes per character. If s is null, a NullPointerException is thrown. If s.length is zero, then no characters are written. Otherwise, the character s[0] is written first, then s[1], and so on; the last character written is s[s.length-1]. For each character, two bytes are actually written, high-order byte first, in exactly the manner of the writeChar method.
public abstract void writeChars(java.lang.String s) throws java.io.IOException;
- /**
- * Writes a double value, which is comprised of eight bytes, to the output stream. It does this as if it first converts this double value to a long in exactly the manner of the Double.doubleToLongBits method and then writes the long value in exactly the manner of the writeLong method. The bytes written by this method may be read by the readDouble method of interface DataInput, which will then return a double equal to v.
- */
+ /// Writes a double value, which is comprised of eight bytes, to the output stream. It does this as if it first converts this double value to a long in exactly the manner of the Double.doubleToLongBits method and then writes the long value in exactly the manner of the writeLong method. The bytes written by this method may be read by the readDouble method of interface DataInput, which will then return a double equal to v.
public abstract void writeDouble(double v) throws java.io.IOException;
- /**
- * Writes a float value, which is comprised of four bytes, to the output stream. It does this as if it first converts this float value to an int in exactly the manner of the Float.floatToIntBits method and then writes the int value in exactly the manner of the writeInt method. The bytes written by this method may be read by the readFloat method of interface DataInput, which will then return a float equal to v.
- */
+ /// Writes a float value, which is comprised of four bytes, to the output stream. It does this as if it first converts this float value to an int in exactly the manner of the Float.floatToIntBits method and then writes the int value in exactly the manner of the writeInt method. The bytes written by this method may be read by the readFloat method of interface DataInput, which will then return a float equal to v.
public abstract void writeFloat(float v) throws java.io.IOException;
- /**
- * Writes an int value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:
- * (byte)(0xff (v 24)) (byte)(0xff (v 16)) (byte)(0xff (v 8)) (byte)(0xff v)
- * The bytes written by this method may be read by the readInt method of interface DataInput, which will then return an int equal to v.
- */
+ /// Writes an int value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:
+ /// (byte)(0xff (v 24)) (byte)(0xff (v 16)) (byte)(0xff (v 8)) (byte)(0xff v)
+ /// The bytes written by this method may be read by the readInt method of interface DataInput, which will then return an int equal to v.
public abstract void writeInt(int v) throws java.io.IOException;
- /**
- * Writes an long value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:
- * (byte)(0xff (v 56)) (byte)(0xff (v 48)) (byte)(0xff (v 40)) (byte)(0xff (v 32)) (byte)(0xff (v 24)) (byte)(0xff (v 16)) (byte)(0xff (v 8)) (byte)(0xff v)
- * The bytes written by this method may be read by the readLong method of interface DataInput, which will then return a long equal to v.
- */
+ /// Writes an long value, which is comprised of four bytes, to the output stream. The byte values to be written, in the order shown, are:
+ /// (byte)(0xff (v 56)) (byte)(0xff (v 48)) (byte)(0xff (v 40)) (byte)(0xff (v 32)) (byte)(0xff (v 24)) (byte)(0xff (v 16)) (byte)(0xff (v 8)) (byte)(0xff v)
+ /// The bytes written by this method may be read by the readLong method of interface DataInput, which will then return a long equal to v.
public abstract void writeLong(long v) throws java.io.IOException;
- /**
- * Writes two bytes to the output stream to represent the value of the argument. The byte values to be written, in the order shown, are:
- * (byte)(0xff (v 8)) (byte)(0xff v)
- * The bytes written by this method may be read by the readShort method of interface DataInput, which will then return a short equal to (short)v.
- */
+ /// Writes two bytes to the output stream to represent the value of the argument. The byte values to be written, in the order shown, are:
+ /// (byte)(0xff (v 8)) (byte)(0xff v)
+ /// The bytes written by this method may be read by the readShort method of interface DataInput, which will then return a short equal to (short)v.
public abstract void writeShort(int v) throws java.io.IOException;
- /**
- * Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s. If s is null, a NullPointerException is thrown. Each character in the string s is converted to a group of one, two, or three bytes, depending on the value of the character.
- * If a character c is in the range u0001 through u007f, it is represented by one byte:
- * (byte)c
- * If a character c is u0000 or is in the range u0080 through u07ff, then it is represented by two bytes, to be written in the order shown:
- * (byte)(0xc0 | (0x1f (c 6))) (byte)(0x80 | (0x3f c))
- * If a character c is in the range u0800 through uffff, then it is represented by three bytes, to be written in the order shown:
- * (byte)(0xe0 | (0x0f (c 12))) (byte)(0x80 | (0x3f (c 6))) (byte)(0x80 | (0x3f c))
- * First, the total number of bytes needed to represent all the characters of s is calculated. If this number is larger than 65535, then a UTFDataFormatError is thrown. Otherwise, this length is written to the output stream in exactly the manner of the writeShort method; after this, the one-, two-, or three-byte representation of each character in the string s is written.
- * The bytes written by this method may be read by the readUTF method of interface DataInput, which will then return a String equal to s.
- */
+ /// Writes two bytes of length information to the output stream, followed by the Java modified UTF representation of every character in the string s. If s is null, a NullPointerException is thrown. Each character in the string s is converted to a group of one, two, or three bytes, depending on the value of the character.
+ /// If a character c is in the range u0001 through u007f, it is represented by one byte:
+ /// (byte)c
+ /// If a character c is u0000 or is in the range u0080 through u07ff, then it is represented by two bytes, to be written in the order shown:
+ /// (byte)(0xc0 | (0x1f (c 6))) (byte)(0x80 | (0x3f c))
+ /// If a character c is in the range u0800 through uffff, then it is represented by three bytes, to be written in the order shown:
+ /// (byte)(0xe0 | (0x0f (c 12))) (byte)(0x80 | (0x3f (c 6))) (byte)(0x80 | (0x3f c))
+ /// First, the total number of bytes needed to represent all the characters of s is calculated. If this number is larger than 65535, then a UTFDataFormatError is thrown. Otherwise, this length is written to the output stream in exactly the manner of the writeShort method; after this, the one-, two-, or three-byte representation of each character in the string s is written.
+ /// The bytes written by this method may be read by the readUTF method of interface DataInput, which will then return a String equal to s.
public abstract void writeUTF(java.lang.String s) throws java.io.IOException;
}
diff --git a/Ports/CLDC11/src/java/io/DataOutputStream.java b/Ports/CLDC11/src/java/io/DataOutputStream.java
index fe270f9d43..93837cb0e3 100644
--- a/Ports/CLDC11/src/java/io/DataOutputStream.java
+++ b/Ports/CLDC11/src/java/io/DataOutputStream.java
@@ -22,122 +22,88 @@
* have any questions.
*/
package java.io;
-/**
- * A data output stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in.
- * Since: JDK1.0, CLDC 1.0 See Also:DataInputStream
- */
+/// A data output stream lets an application write primitive Java data types to an output stream in a portable way. An application can then use a data input stream to read the data back in.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataInputStream
public class DataOutputStream extends java.io.OutputStream implements java.io.DataOutput{
- /**
- * The output stream.
- */
+ /// The output stream.
protected java.io.OutputStream out;
- /**
- * Creates a new data output stream to write data to the specified underlying output stream.
- * out - the underlying output stream, to be saved for later use.
- */
+ /// Creates a new data output stream to write data to the specified underlying output stream.
+ /// out - the underlying output stream, to be saved for later use.
public DataOutputStream(java.io.OutputStream out){
//TODO codavaj!!
}
- /**
- * Closes this output stream and releases any system resources associated with the stream.
- * The close method calls its flush method, and then calls the close method of its underlying output stream.
- */
+ /// Closes this output stream and releases any system resources associated with the stream.
+ /// The close method calls its flush method, and then calls the close method of its underlying output stream.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Flushes this data output stream. This forces any buffered output bytes to be written out to the stream.
- * The flush method of DataOutputStream calls the flush method of its underlying output stream.
- */
+ /// Flushes this data output stream. This forces any buffered output bytes to be written out to the stream.
+ /// The flush method of DataOutputStream calls the flush method of its underlying output stream.
public void flush() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
- */
+ /// Writes len bytes from the specified byte array starting at offset off to the underlying output stream.
public void write(byte[] b, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
- * Implements the write method of OutputStream.
- */
+ /// Writes the specified byte (the low eight bits of the argument b) to the underlying output stream.
+ /// Implements the write method of OutputStream.
public void write(int b) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a boolean to the underlying output stream as a 1-byte value. The value true is written out as the value (byte)1; the value false is written out as the value (byte)0.
- */
+ /// Writes a boolean to the underlying output stream as a 1-byte value. The value true is written out as the value (byte)1; the value false is written out as the value (byte)0.
public final void writeBoolean(boolean v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes out a byte to the underlying output stream as a 1-byte value.
- */
+ /// Writes out a byte to the underlying output stream as a 1-byte value.
public final void writeByte(int v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a char to the underlying output stream as a 2-byte value, high byte first.
- */
+ /// Writes a char to the underlying output stream as a 2-byte value, high byte first.
public final void writeChar(int v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a string to the underlying output stream as a sequence of characters. Each character is written to the data output stream as if by the writeChar method.
- */
+ /// Writes a string to the underlying output stream as a sequence of characters. Each character is written to the data output stream as if by the writeChar method.
public final void writeChars(java.lang.String s) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
- */
+ /// Converts the double argument to a long using the doubleToLongBits method in class Double, and then writes that long value to the underlying output stream as an 8-byte quantity, high byte first.
public final void writeDouble(double v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
- */
+ /// Converts the float argument to an int using the floatToIntBits method in class Float, and then writes that int value to the underlying output stream as a 4-byte quantity, high byte first.
public final void writeFloat(float v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes an int to the underlying output stream as four bytes, high byte first.
- */
+ /// Writes an int to the underlying output stream as four bytes, high byte first.
public final void writeInt(int v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a long to the underlying output stream as eight bytes, high byte first.
- */
+ /// Writes a long to the underlying output stream as eight bytes, high byte first.
public final void writeLong(long v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a short to the underlying output stream as two bytes, high byte first.
- */
+ /// Writes a short to the underlying output stream as two bytes, high byte first.
public final void writeShort(int v) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
- * First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for the character.
- */
+ /// Writes a string to the underlying output stream using UTF-8 encoding in a machine-independent manner.
+ /// First, two bytes are written to the output stream as if by the writeShort method giving the number of bytes to follow. This value is the number of bytes actually written out, not the length of the string. Following the length, each character of the string is output, in sequence, using the UTF-8 encoding for the character.
public final void writeUTF(java.lang.String str) throws java.io.IOException{
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/EOFException.java b/Ports/CLDC11/src/java/io/EOFException.java
index 04ae6c1ae9..882d923866 100644
--- a/Ports/CLDC11/src/java/io/EOFException.java
+++ b/Ports/CLDC11/src/java/io/EOFException.java
@@ -22,25 +22,19 @@
* have any questions.
*/
package java.io;
-/**
- * Signals that an end of file or end of stream has been reached unexpectedly during input.
- * This exception is mainly used by data input streams, which generally expect a binary file in a specific format, and for which an end of stream is an unusual condition. Most other input streams return a special value on end of stream.
- * Note that some input operations react to end-of-file by returning a distinguished value (such as -1) rather than by throwing an exception.
- * Since: JDK1.0, CLDC 1.0 See Also:DataInputStream, IOException
- */
+/// Signals that an end of file or end of stream has been reached unexpectedly during input.
+/// This exception is mainly used by data input streams, which generally expect a binary file in a specific format, and for which an end of stream is an unusual condition. Most other input streams return a special value on end of stream.
+/// Note that some input operations react to end-of-file by returning a distinguished value (such as -1) rather than by throwing an exception.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataInputStream, IOException
public class EOFException extends java.io.IOException{
- /**
- * Constructs an EOFException with null as its error detail message.
- */
+ /// Constructs an EOFException with null as its error detail message.
public EOFException(){
//TODO codavaj!!
}
- /**
- * Constructs an EOFException with the specified detail message. The string s may later be retrieved by the
- * method of class java.lang.Throwable.
- * s - the detail message.
- */
+ /// Constructs an EOFException with the specified detail message. The string s may later be retrieved by the
+ /// method of class java.lang.Throwable.
+ /// s - the detail message.
public EOFException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/Flushable.java b/Ports/CLDC11/src/java/io/Flushable.java
index e0b7c02d0c..0eeea163bf 100644
--- a/Ports/CLDC11/src/java/io/Flushable.java
+++ b/Ports/CLDC11/src/java/io/Flushable.java
@@ -18,22 +18,17 @@
import java.io.IOException;
-/**
- *
- * Indicates that an output object can be flushed.
- *
- *
- * @since 1.5
- */
+/// Indicates that an output object can be flushed.
+///
+/// #### Since
+///
+/// 1.5
public interface Flushable {
- /**
- *
- * Flushes the object by writing out any buffered data to the underlying
- * output.
- *
- *
- * @throws IOException
- * if there are any issues writing the data.
- */
+ /// Flushes the object by writing out any buffered data to the underlying
+ /// output.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if there are any issues writing the data.
void flush() throws IOException;
}
diff --git a/Ports/CLDC11/src/java/io/IOException.java b/Ports/CLDC11/src/java/io/IOException.java
index 68ccaf2839..95b86405a8 100644
--- a/Ports/CLDC11/src/java/io/IOException.java
+++ b/Ports/CLDC11/src/java/io/IOException.java
@@ -22,41 +22,34 @@
* have any questions.
*/
package java.io;
-/**
- * Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
- * Since: JDK1.0, CLDC 1.0 See Also:InputStream, OutputStream
- */
+/// Signals that an I/O exception of some sort has occurred. This class is the general class of exceptions produced by failed or interrupted I/O operations.
+/// Since: JDK1.0, CLDC 1.0 See Also:InputStream, OutputStream
public class IOException extends java.lang.Exception{
- /**
- * Constructs an IOException with null as its error detail message.
- */
+ /// Constructs an IOException with null as its error detail message.
public IOException(){
//TODO codavaj!!
}
- /**
- * Constructs an IOException with the specified detail message. The error message string s can later be retrieved by the
- * method of class java.lang.Throwable.
- * s - the detail message.
- */
+ /// Constructs an IOException with the specified detail message. The error message string s can later be retrieved by the
+ /// method of class java.lang.Throwable.
+ /// s - the detail message.
public IOException(java.lang.String s){
//TODO codavaj!!
}
- /**
- * Constructs an IOException with the specified cause.
- * @param cause
- */
+ /// Constructs an IOException with the specified cause.
+ ///
+ /// #### Parameters
+ ///
+ /// - `cause`
public IOException(Throwable cause) {
//TODO codavaj!!
}
- /**
- * Constructs an IOException with the specified detail message and cause. The error message string s can later be retrieved by the
- * method of class java.lang.Throwable.
- * s - the detail message.
- * cause - The cause.
- */
+ /// Constructs an IOException with the specified detail message and cause. The error message string s can later be retrieved by the
+ /// method of class java.lang.Throwable.
+ /// s - the detail message.
+ /// cause - The cause.
public IOException(java.lang.String s, Throwable cause) {
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/InputStream.java b/Ports/CLDC11/src/java/io/InputStream.java
index 3aac441528..5bb26786fe 100644
--- a/Ports/CLDC11/src/java/io/InputStream.java
+++ b/Ports/CLDC11/src/java/io/InputStream.java
@@ -22,96 +22,76 @@
* have any questions.
*/
package java.io;
-/**
- * This abstract class is the superclass of all classes representing an input stream of bytes.
- * Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.
- * Since: JDK1.0, CLDC 1.0 See Also:ByteArrayInputStream, DataInputStream, read(), OutputStream
- */
+/// This abstract class is the superclass of all classes representing an input stream of bytes.
+/// Applications that need to define a subclass of InputStream must always provide a method that returns the next byte of input.
+/// Since: JDK1.0, CLDC 1.0 See Also:ByteArrayInputStream, DataInputStream, read(), OutputStream
public abstract class InputStream implements AutoCloseable {
public InputStream(){
//TODO codavaj!!
}
- /**
- * Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread.
- * The available method for class InputStream always returns 0.
- * This method should be overridden by subclasses.
- */
+ /// Returns the number of bytes that can be read (or skipped over) from this input stream without blocking by the next caller of a method for this input stream. The next caller might be the same thread or another thread.
+ /// The available method for class InputStream always returns 0.
+ /// This method should be overridden by subclasses.
public int available() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Closes this input stream and releases any system resources associated with the stream.
- * The close method of InputStream does nothing.
- */
+ /// Closes this input stream and releases any system resources associated with the stream.
+ /// The close method of InputStream does nothing.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
- * The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
- * The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.
- * The mark method of InputStream does nothing.
- */
+ /// Marks the current position in this input stream. A subsequent call to the reset method repositions this stream at the last marked position so that subsequent reads re-read the same bytes.
+ /// The readlimit arguments tells this input stream to allow that many bytes to be read before the mark position gets invalidated.
+ /// The general contract of mark is that, if the method markSupported returns true, the stream somehow remembers all the bytes read after the call to mark and stands ready to supply those same bytes again if and whenever the method reset is called. However, the stream is not required to remember any data at all if more than readlimit bytes are read from the stream before reset is called.
+ /// The mark method of InputStream does nothing.
public void mark(int readlimit){
return; //TODO codavaj!!
}
- /**
- * Tests if this input stream supports the mark and reset methods. The markSupported method of InputStream returns false.
- */
+ /// Tests if this input stream supports the mark and reset methods. The markSupported method of InputStream returns false.
public boolean markSupported(){
return false; //TODO codavaj!!
}
- /**
- * Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
- * A subclass must provide an implementation of this method.
- */
+ /// Reads the next byte of data from the input stream. The value byte is returned as an int in the range 0 to 255. If no byte is available because the end of the stream has been reached, the value -1 is returned. This method blocks until input data is available, the end of the stream is detected, or an exception is thrown.
+ /// A subclass must provide an implementation of this method.
public abstract int read() throws java.io.IOException;
- /**
- * Reads some number of bytes from the input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.
- * If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.
- * The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.
- * If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.
- * The read(b) method for class InputStream has the same effect as: read(b, 0, b.length)
- */
+ /// Reads some number of bytes from the input stream and stores them into the buffer array b. The number of bytes actually read is returned as an integer. This method blocks until input data is available, end of file is detected, or an exception is thrown.
+ /// If b is null, a NullPointerException is thrown. If the length of b is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.
+ /// The first byte read is stored into element b[0], the next one into b[1], and so on. The number of bytes read is, at most, equal to the length of b. Let k be the number of bytes actually read; these bytes will be stored in elements b[0] through b[k-1], leaving elements b[k] through b[b.length-1] unaffected.
+ /// If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.
+ /// The read(b) method for class InputStream has the same effect as: read(b, 0, b.length)
public int read(byte[] b) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.
- * This method blocks until input data is available, end of file is detected, or an exception is thrown.
- * If b is null, a NullPointerException is thrown.
- * If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.
- * If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.
- * The first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len. Let k be the number of bytes actually read; these bytes will be stored in elements b[off] through b[off+k-1], leaving elements b[off+k] through b[off+len-1] unaffected.
- * In every case, elements b[0] through b[off] and elements b[off+len] through b[b.length-1] are unaffected.
- * If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.
- * The read(b, off, len) method for class InputStream simply calls the method read() repeatedly. If the first such call results in an IOException, that exception is returned from the call to the read(b, off, len) method. If any subsequent call to read() results in a IOException, the exception is caught and treated as if it were end of file; the bytes read up to that point are stored into b and the number of bytes read before the exception occurred is returned. Subclasses are encouraged to provide a more efficient implementation of this method.
- */
+ /// Reads up to len bytes of data from the input stream into an array of bytes. An attempt is made to read as many as len bytes, but a smaller number may be read, possibly zero. The number of bytes actually read is returned as an integer.
+ /// This method blocks until input data is available, end of file is detected, or an exception is thrown.
+ /// If b is null, a NullPointerException is thrown.
+ /// If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.
+ /// If len is zero, then no bytes are read and 0 is returned; otherwise, there is an attempt to read at least one byte. If no byte is available because the stream is at end of file, the value -1 is returned; otherwise, at least one byte is read and stored into b.
+ /// The first byte read is stored into element b[off], the next one into b[off+1], and so on. The number of bytes read is, at most, equal to len. Let k be the number of bytes actually read; these bytes will be stored in elements b[off] through b[off+k-1], leaving elements b[off+k] through b[off+len-1] unaffected.
+ /// In every case, elements b[0] through b[off] and elements b[off+len] through b[b.length-1] are unaffected.
+ /// If the first byte cannot be read for any reason other than end of file, then an IOException is thrown. In particular, an IOException is thrown if the input stream has been closed.
+ /// The read(b, off, len) method for class InputStream simply calls the method read() repeatedly. If the first such call results in an IOException, that exception is returned from the call to the read(b, off, len) method. If any subsequent call to read() results in a IOException, the exception is caught and treated as if it were end of file; the bytes read up to that point are stored into b and the number of bytes read before the exception occurred is returned. Subclasses are encouraged to provide a more efficient implementation of this method.
public int read(byte[] b, int off, int len) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Repositions this stream to the position at the time the mark method was last called on this input stream.
- * The general contract of reset is:
- * If the method markSupported returns true, then: If the method mark has not been called since the stream was created, or the number of bytes read from the stream since mark was last called is larger than the argument to mark at that last call, then an IOException might be thrown. If such an IOException is not thrown, then the stream is reset to a state such that all the bytes read since the most recent call to mark (or since the start of the file, if mark has not been called) will be resupplied to subsequent callers of the read method, followed by any bytes that otherwise would have been the next input data as of the time of the call to reset. If the method markSupported returns false, then: The call to reset may throw an IOException. If an IOException is not thrown, then the stream is reset to a fixed state that depends on the particular type of the input stream and how it was created. The bytes that will be supplied to subsequent callers of the read method depend on the particular type of the input stream.
- * The method reset for class InputStream does nothing and always throws an IOException.
- */
+ /// Repositions this stream to the position at the time the mark method was last called on this input stream.
+ /// The general contract of reset is:
+ /// If the method markSupported returns true, then: If the method mark has not been called since the stream was created, or the number of bytes read from the stream since mark was last called is larger than the argument to mark at that last call, then an IOException might be thrown. If such an IOException is not thrown, then the stream is reset to a state such that all the bytes read since the most recent call to mark (or since the start of the file, if mark has not been called) will be resupplied to subsequent callers of the read method, followed by any bytes that otherwise would have been the next input data as of the time of the call to reset. If the method markSupported returns false, then: The call to reset may throw an IOException. If an IOException is not thrown, then the stream is reset to a fixed state that depends on the particular type of the input stream and how it was created. The bytes that will be supplied to subsequent callers of the read method depend on the particular type of the input stream.
+ /// The method reset for class InputStream does nothing and always throws an IOException.
public void reset() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.
- * The skip method of InputStream creates a byte array and then repeatedly reads into it until n bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.
- */
+ /// Skips over and discards n bytes of data from this input stream. The skip method may, for a variety of reasons, end up skipping over some smaller number of bytes, possibly 0. This may result from any of a number of conditions; reaching end of file before n bytes have been skipped is only one possibility. The actual number of bytes skipped is returned. If n is negative, no bytes are skipped.
+ /// The skip method of InputStream creates a byte array and then repeatedly reads into it until n bytes have been read or the end of the stream has been reached. Subclasses are encouraged to provide a more efficient implementation of this method.
public long skip(long n) throws java.io.IOException{
return 0l; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/InputStreamReader.java b/Ports/CLDC11/src/java/io/InputStreamReader.java
index 38f798beb4..9769621f7b 100644
--- a/Ports/CLDC11/src/java/io/InputStreamReader.java
+++ b/Ports/CLDC11/src/java/io/InputStreamReader.java
@@ -22,81 +22,59 @@
* have any questions.
*/
package java.io;
-/**
- * An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.
- * Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
- * Since: CLDC 1.0 See Also:Reader, UnsupportedEncodingException
- */
+/// An InputStreamReader is a bridge from byte streams to character streams: It reads bytes and translates them into characters. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.
+/// Each invocation of one of an InputStreamReader's read() methods may cause one or more bytes to be read from the underlying byte input stream. To enable the efficient conversion of bytes to characters, more bytes may be read ahead from the underlying stream than are necessary to satisfy the current read operation.
+/// Since: CLDC 1.0 See Also:Reader, UnsupportedEncodingException
public class InputStreamReader extends java.io.Reader{
- /**
- * Create an InputStreamReader that uses the default character encoding.
- * is - An InputStream
- */
+ /// Create an InputStreamReader that uses the default character encoding.
+ /// is - An InputStream
public InputStreamReader(java.io.InputStream is){
//TODO codavaj!!
}
- /**
- * Create an InputStreamReader that uses the named character encoding.
- * is - An InputStreamenc - The name of a supported character encoding
- * - If the named encoding is not supported
- */
+ /// Create an InputStreamReader that uses the named character encoding.
+ /// is - An InputStreamenc - The name of a supported character encoding
+ /// - If the named encoding is not supported
public InputStreamReader(java.io.InputStream is, java.lang.String enc) throws java.io.UnsupportedEncodingException{
//TODO codavaj!!
}
- /**
- * Close the stream. Closing a previously closed stream has no effect.
- */
+ /// Close the stream. Closing a previously closed stream has no effect.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Mark the present position in the stream.
- */
+ /// Mark the present position in the stream.
public void mark(int readAheadLimit) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Tell whether this stream supports the mark() operation.
- */
+ /// Tell whether this stream supports the mark() operation.
public boolean markSupported(){
return false; //TODO codavaj!!
}
- /**
- * Read a single character.
- */
+ /// Read a single character.
public int read() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Read characters into a portion of an array.
- */
+ /// Read characters into a portion of an array.
public int read(char[] cbuf, int off, int len) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Tell whether this stream is ready to be read.
- */
+ /// Tell whether this stream is ready to be read.
public boolean ready() throws java.io.IOException{
return false; //TODO codavaj!!
}
- /**
- * Reset the stream.
- */
+ /// Reset the stream.
public void reset() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Skip characters.
- */
+ /// Skip characters.
public long skip(long n) throws java.io.IOException{
return 0l; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/InterruptedIOException.java b/Ports/CLDC11/src/java/io/InterruptedIOException.java
index 835c499532..13be9c939b 100644
--- a/Ports/CLDC11/src/java/io/InterruptedIOException.java
+++ b/Ports/CLDC11/src/java/io/InterruptedIOException.java
@@ -22,28 +22,20 @@
* have any questions.
*/
package java.io;
-/**
- * Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was terminated. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.
- * Since: JDK1.0, CLDC 1.0 See Also:InputStream, OutputStream
- */
+/// Signals that an I/O operation has been interrupted. An InterruptedIOException is thrown to indicate that an input or output transfer has been terminated because the thread performing it was terminated. The field bytesTransferred indicates how many bytes were successfully transferred before the interruption occurred.
+/// Since: JDK1.0, CLDC 1.0 See Also:InputStream, OutputStream
public class InterruptedIOException extends java.io.IOException{
- /**
- * Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
- */
+ /// Reports how many bytes had been transferred as part of the I/O operation before it was interrupted.
public int bytesTransferred;
- /**
- * Constructs an InterruptedIOException with null as its error detail message.
- */
+ /// Constructs an InterruptedIOException with null as its error detail message.
public InterruptedIOException(){
//TODO codavaj!!
}
- /**
- * Constructs an InterruptedIOException with the specified detail message. The string s can be retrieved later by the
- * method of class java.lang.Throwable.
- * s - the detail message.
- */
+ /// Constructs an InterruptedIOException with the specified detail message. The string s can be retrieved later by the
+ /// method of class java.lang.Throwable.
+ /// s - the detail message.
public InterruptedIOException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/OutputStream.java b/Ports/CLDC11/src/java/io/OutputStream.java
index 49398a8cd1..ee54f5a6a4 100644
--- a/Ports/CLDC11/src/java/io/OutputStream.java
+++ b/Ports/CLDC11/src/java/io/OutputStream.java
@@ -22,53 +22,41 @@
* have any questions.
*/
package java.io;
-/**
- * This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.
- * Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output.
- * Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, DataOutputStream, InputStream, write(int)
- */
+/// This abstract class is the superclass of all classes representing an output stream of bytes. An output stream accepts output bytes and sends them to some sink.
+/// Applications that need to define a subclass of OutputStream must always provide at least a method that writes one byte of output.
+/// Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, DataOutputStream, InputStream, write(int)
public abstract class OutputStream implements AutoCloseable {
public OutputStream(){
//TODO codavaj!!
}
- /**
- * Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.
- * The close method of OutputStream does nothing.
- */
+ /// Closes this output stream and releases any system resources associated with this stream. The general contract of close is that it closes the output stream. A closed stream cannot perform output operations and cannot be reopened.
+ /// The close method of OutputStream does nothing.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.
- * The flush method of OutputStream does nothing.
- */
+ /// Flushes this output stream and forces any buffered output bytes to be written out. The general contract of flush is that calling it is an indication that, if any bytes previously written have been buffered by the implementation of the output stream, such bytes should immediately be written to their intended destination.
+ /// The flush method of OutputStream does nothing.
public void flush() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).
- */
+ /// Writes b.length bytes from the specified byte array to this output stream. The general contract for write(b) is that it should have exactly the same effect as the call write(b, 0, b.length).
public void write(byte[] b) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.
- * The write method of OutputStream calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation.
- * If b is null, a NullPointerException is thrown.
- * If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.
- */
+ /// Writes len bytes from the specified byte array starting at offset off to this output stream. The general contract for write(b, off, len) is that some of the bytes in the array b are written to the output stream in order; element b[off] is the first byte written and b[off+len-1] is the last byte written by this operation.
+ /// The write method of OutputStream calls the write method of one argument on each of the bytes to be written out. Subclasses are encouraged to override this method and provide a more efficient implementation.
+ /// If b is null, a NullPointerException is thrown.
+ /// If off is negative, or len is negative, or off+len is greater than the length of the array b, then an IndexOutOfBoundsException is thrown.
public void write(byte[] b, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
- * Subclasses of OutputStream must provide an implementation for this method.
- */
+ /// Writes the specified byte to this output stream. The general contract for write is that one byte is written to the output stream. The byte to be written is the eight low-order bits of the argument b. The 24 high-order bits of b are ignored.
+ /// Subclasses of OutputStream must provide an implementation for this method.
public abstract void write(int b) throws java.io.IOException;
}
diff --git a/Ports/CLDC11/src/java/io/OutputStreamWriter.java b/Ports/CLDC11/src/java/io/OutputStreamWriter.java
index 081cd3d9a5..4e666f37c0 100644
--- a/Ports/CLDC11/src/java/io/OutputStreamWriter.java
+++ b/Ports/CLDC11/src/java/io/OutputStreamWriter.java
@@ -22,60 +22,44 @@
* have any questions.
*/
package java.io;
-/**
- * An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.
- * Each invocation of a write() method causes the encoding converter to be invoked on the given character(s). The resulting bytes are accumulated in a buffer before being written to the underlying output stream. The size of this buffer may be specified, but by default it is large enough for most purposes. Note that the characters passed to the write() methods are not buffered.
- * Since: CLDC 1.0 See Also:Writer, UnsupportedEncodingException
- */
+/// An OutputStreamWriter is a bridge from character streams to byte streams: Characters written to it are translated into bytes. The encoding that it uses may be specified by name, or the platform's default encoding may be accepted.
+/// Each invocation of a write() method causes the encoding converter to be invoked on the given character(s). The resulting bytes are accumulated in a buffer before being written to the underlying output stream. The size of this buffer may be specified, but by default it is large enough for most purposes. Note that the characters passed to the write() methods are not buffered.
+/// Since: CLDC 1.0 See Also:Writer, UnsupportedEncodingException
public class OutputStreamWriter extends java.io.Writer{
- /**
- * Create an OutputStreamWriter that uses the default character encoding.
- * os - An OutputStream
- */
+ /// Create an OutputStreamWriter that uses the default character encoding.
+ /// os - An OutputStream
public OutputStreamWriter(java.io.OutputStream os){
//TODO codavaj!!
}
- /**
- * Create an OutputStreamWriter that uses the named character encoding.
- * os - An OutputStreamenc - The name of a supported
- * - If the named encoding is not supported
- */
+ /// Create an OutputStreamWriter that uses the named character encoding.
+ /// os - An OutputStreamenc - The name of a supported
+ /// - If the named encoding is not supported
public OutputStreamWriter(java.io.OutputStream os, java.lang.String enc) throws java.io.UnsupportedEncodingException{
//TODO codavaj!!
}
- /**
- * Close the stream.
- */
+ /// Close the stream.
public void close() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Flush the stream.
- */
+ /// Flush the stream.
public void flush() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a portion of an array of characters.
- */
+ /// Write a portion of an array of characters.
public void write(char[] cbuf, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a single character.
- */
+ /// Write a single character.
public void write(int c) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a portion of a string.
- */
+ /// Write a portion of a string.
public void write(java.lang.String str, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/PrintStream.java b/Ports/CLDC11/src/java/io/PrintStream.java
index 41f6a38617..105577e089 100644
--- a/Ports/CLDC11/src/java/io/PrintStream.java
+++ b/Ports/CLDC11/src/java/io/PrintStream.java
@@ -22,54 +22,40 @@
* have any questions.
*/
package java.io;
-/**
- * A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently. Two other features are provided as well. Unlike other output streams, a PrintStream never throws an IOException; instead, exceptional situations merely set an internal flag that can be tested via the checkError method.
- * All characters printed by a PrintStream are converted into bytes using the platform's default character encoding.
- * Since: JDK1.0, CLDC 1.0
- */
+/// A PrintStream adds functionality to another output stream, namely the ability to print representations of various data values conveniently. Two other features are provided as well. Unlike other output streams, a PrintStream never throws an IOException; instead, exceptional situations merely set an internal flag that can be tested via the checkError method.
+/// All characters printed by a PrintStream are converted into bytes using the platform's default character encoding.
+/// Since: JDK1.0, CLDC 1.0
public class PrintStream extends java.io.OutputStream{
- /**
- * Create a new print stream. This stream will not flush automatically.
- * out - The output stream to which values and objects will be printed
- */
+ /// Create a new print stream. This stream will not flush automatically.
+ /// out - The output stream to which values and objects will be printed
public PrintStream(java.io.OutputStream out){
//TODO codavaj!!
}
- /**
- * Flush the stream and check its error state. The internal error state is set to true when the underlying output stream throws an IOException, and when the setError method is invoked.
- */
+ /// Flush the stream and check its error state. The internal error state is set to true when the underlying output stream throws an IOException, and when the setError method is invoked.
public boolean checkError(){
return false; //TODO codavaj!!
}
- /**
- * Close the stream. This is done by flushing the stream and then closing the underlying output stream.
- */
+ /// Close the stream. This is done by flushing the stream and then closing the underlying output stream.
public void close(){
return; //TODO codavaj!!
}
- /**
- * Flush the stream. This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.
- */
+ /// Flush the stream. This is done by writing any buffered output bytes to the underlying output stream and then flushing that stream.
public void flush(){
return; //TODO codavaj!!
}
- /**
- * Print a boolean value. The string produced by
- * is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print a boolean value. The string produced by
+ /// is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(boolean b){
return; //TODO codavaj!!
}
- /**
- * Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print an array of characters. The characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(char c){
return; //TODO codavaj!!
}
@@ -78,80 +64,62 @@ void print(char[] s){
return; //TODO codavaj!!
}
- /**
- * Print a double-precision floating point number. The string produced by
- * is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print a double-precision floating point number. The string produced by
+ /// is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(double d){
return; //TODO codavaj!!
}
- /**
- * Print a floating point number. The string produced by
- * is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print a floating point number. The string produced by
+ /// is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(float f){
return; //TODO codavaj!!
}
- /**
- * Print an integer. The string produced by
- * is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print an integer. The string produced by
+ /// is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(int i){
return; //TODO codavaj!!
}
- /**
- * Print a long integer. The string produced by
- * is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print a long integer. The string produced by
+ /// is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(long l){
return; //TODO codavaj!!
}
- /**
- * Print an object. The string produced by the
- * method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print an object. The string produced by the
+ /// method is translated into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(java.lang.Object obj){
return; //TODO codavaj!!
}
- /**
- * Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
- * method.
- */
+ /// Print a string. If the argument is null then the string "null" is printed. Otherwise, the string's characters are converted into bytes according to the platform's default character encoding, and these bytes are written in exactly the manner of the
+ /// method.
public void print(java.lang.String s){
return; //TODO codavaj!!
}
- /**
- * Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').
- */
+ /// Terminate the current line by writing the line separator string. The line separator string is defined by the system property line.separator, and is not necessarily a single newline character ('\n').
public void println(){
return; //TODO codavaj!!
}
- /**
- * Print a boolean and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print a boolean and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(boolean x){
return; //TODO codavaj!!
}
- /**
- * Print an array of characters and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print an array of characters and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(char x){
return; //TODO codavaj!!
}
@@ -160,79 +128,61 @@ void println(char[] x){
return; //TODO codavaj!!
}
- /**
- * Print a double and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print a double and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(double x){
return; //TODO codavaj!!
}
- /**
- * Print a float and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print a float and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(float x){
return; //TODO codavaj!!
}
- /**
- * Print an integer and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print an integer and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(int x){
return; //TODO codavaj!!
}
- /**
- * Print a long and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print a long and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(long x){
return; //TODO codavaj!!
}
- /**
- * Print an Object and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print an Object and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(java.lang.Object x){
return; //TODO codavaj!!
}
- /**
- * Print a String and then terminate the line. This method behaves as though it invokes
- * and then
- * .
- */
+ /// Print a String and then terminate the line. This method behaves as though it invokes
+ /// and then
+ /// .
public void println(java.lang.String x){
return; //TODO codavaj!!
}
- /**
- * Set the error state of the stream to true.
- */
+ /// Set the error state of the stream to true.
protected void setError(){
return; //TODO codavaj!!
}
- /**
- * Write len bytes from the specified byte array starting at offset off to this stream.
- * Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.
- */
+ /// Write len bytes from the specified byte array starting at offset off to this stream.
+ /// Note that the bytes will be written as given; to write characters that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.
public void write(byte[] buf, int off, int len){
return; //TODO codavaj!!
}
- /**
- * Write the specified byte to this stream.
- * Note that the byte is written as given; to write a character that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.
- */
+ /// Write the specified byte to this stream.
+ /// Note that the byte is written as given; to write a character that will be translated according to the platform's default character encoding, use the print(char) or println(char) methods.
public void write(int b){
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/Reader.java b/Ports/CLDC11/src/java/io/Reader.java
index c7ed91790d..094f8088ab 100644
--- a/Ports/CLDC11/src/java/io/Reader.java
+++ b/Ports/CLDC11/src/java/io/Reader.java
@@ -22,87 +22,61 @@
* have any questions.
*/
package java.io;
-/**
- * Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
- * Since: JDK1.1, CLDC 1.0 See Also:InputStreamReader, Writer
- */
+/// Abstract class for reading character streams. The only methods that a subclass must implement are read(char[], int, int) and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
+/// Since: JDK1.1, CLDC 1.0 See Also:InputStreamReader, Writer
public abstract class Reader implements AutoCloseable {
- /**
- * The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
- */
+ /// The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
protected java.lang.Object lock;
- /**
- * Create a new character-stream reader whose critical sections will synchronize on the reader itself.
- */
+ /// Create a new character-stream reader whose critical sections will synchronize on the reader itself.
protected Reader(){
//TODO codavaj!!
}
- /**
- * Create a new character-stream reader whose critical sections will synchronize on the given object.
- * lock - The Object to synchronize on.
- */
+ /// Create a new character-stream reader whose critical sections will synchronize on the given object.
+ /// lock - The Object to synchronize on.
protected Reader(java.lang.Object lock){
//TODO codavaj!!
}
- /**
- * Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.
- */
+ /// Close the stream. Once a stream has been closed, further read(), ready(), mark(), or reset() invocations will throw an IOException. Closing a previously-closed stream, however, has no effect.
public abstract void close() throws java.io.IOException;
- /**
- * Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
- */
+ /// Mark the present position in the stream. Subsequent calls to reset() will attempt to reposition the stream to this point. Not all character-input streams support the mark() operation.
public void mark(int readAheadLimit) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Tell whether this stream supports the mark() operation. The default implementation always returns false. Subclasses should override this method.
- */
+ /// Tell whether this stream supports the mark() operation. The default implementation always returns false. Subclasses should override this method.
public boolean markSupported(){
return false; //TODO codavaj!!
}
- /**
- * Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.
- * Subclasses that intend to support efficient single-character input should override this method.
- */
+ /// Read a single character. This method will block until a character is available, an I/O error occurs, or the end of the stream is reached.
+ /// Subclasses that intend to support efficient single-character input should override this method.
public int read() throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Read characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
- */
+ /// Read characters into an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
public int read(char[] cbuf) throws java.io.IOException{
return 0; //TODO codavaj!!
}
- /**
- * Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
- */
+ /// Read characters into a portion of an array. This method will block until some input is available, an I/O error occurs, or the end of the stream is reached.
public abstract int read(char[] cbuf, int off, int len) throws java.io.IOException;
- /**
- * Tell whether this stream is ready to be read.
- */
+ /// Tell whether this stream is ready to be read.
public boolean ready() throws java.io.IOException{
return false; //TODO codavaj!!
}
- /**
- * Reset the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
- */
+ /// Reset the stream. If the stream has been marked, then attempt to reposition it at the mark. If the stream has not been marked, then attempt to reset it in some way appropriate to the particular stream, for example by repositioning it to its starting point. Not all character-input streams support the reset() operation, and some support reset() without supporting mark().
public void reset() throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.
- */
+ /// Skip characters. This method will block until some characters are available, an I/O error occurs, or the end of the stream is reached.
public long skip(long n) throws java.io.IOException{
return 0l; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/Serializable.java b/Ports/CLDC11/src/java/io/Serializable.java
index 05f3a0ca7a..f6a3bc543f 100644
--- a/Ports/CLDC11/src/java/io/Serializable.java
+++ b/Ports/CLDC11/src/java/io/Serializable.java
@@ -23,11 +23,9 @@
*/
package java.io;
-/**
- * Here to simplify porting, won't actually work...
- *
- * @author Shai Almog
- */
+/// Here to simplify porting, won't actually work...
+///
+/// @author Shai Almog
public interface Serializable {
}
diff --git a/Ports/CLDC11/src/java/io/StringReader.java b/Ports/CLDC11/src/java/io/StringReader.java
index 9062e7703b..77deeb75e4 100644
--- a/Ports/CLDC11/src/java/io/StringReader.java
+++ b/Ports/CLDC11/src/java/io/StringReader.java
@@ -17,12 +17,12 @@
package java.io;
-/**
- * A specialized {@link Reader} that reads characters from a {@code String} in
- * a sequential manner.
- *
- * @see StringWriter
- */
+/// A specialized `Reader` that reads characters from a `String` in
+/// a sequential manner.
+///
+/// #### See also
+///
+/// - StringWriter
public class StringReader extends Reader {
private String str;
@@ -32,53 +32,55 @@ public class StringReader extends Reader {
private int count;
- /**
- * Construct a new {@code StringReader} with {@code str} as source. The size
- * of the reader is set to the {@code length()} of the string and the Object
- * to synchronize access through is set to {@code str}.
- *
- * @param str
- * the source string for this reader.
- */
+ /// Construct a new `StringReader` with `str` as source. The size
+ /// of the reader is set to the `length()` of the string and the Object
+ /// to synchronize access through is set to `str`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `str`: the source string for this reader.
public StringReader(String str) {
super();
this.str = str;
this.count = str.length();
}
- /**
- * Closes this reader. Once it is closed, read operations on this reader
- * will throw an {@code IOException}. Only the first invocation of this
- * method has any effect.
- */
+ /// Closes this reader. Once it is closed, read operations on this reader
+ /// will throw an `IOException`. Only the first invocation of this
+ /// method has any effect.
@Override
public void close() {
str = null;
}
- /**
- * Returns a boolean indicating whether this reader is closed.
- *
- * @return {@code true} if closed, otherwise {@code false}.
- */
+ /// Returns a boolean indicating whether this reader is closed.
+ ///
+ /// #### Returns
+ ///
+ /// `true` if closed, otherwise `false`.
private boolean isClosed() {
return str == null;
}
- /**
- * Sets a mark position in this reader. The parameter {@code readLimit} is
- * ignored for this class. Calling {@code reset()} will reposition the
- * reader back to the marked position.
- *
- * @param readLimit
- * ignored for {@code StringReader} instances.
- * @throws IllegalArgumentException
- * if {@code readLimit < 0}.
- * @throws IOException
- * if this reader is closed.
- * @see #markSupported()
- * @see #reset()
- */
+ /// Sets a mark position in this reader. The parameter `readLimit` is
+ /// ignored for this class. Calling `reset()` will reposition the
+ /// reader back to the marked position.
+ ///
+ /// #### Parameters
+ ///
+ /// - `readLimit`: ignored for `StringReader` instances.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `readLimit < 0`.
+ ///
+ /// - `IOException`: if this reader is closed.
+ ///
+ /// #### See also
+ ///
+ /// - #markSupported()
+ ///
+ /// - #reset()
@Override
public void mark(int readLimit) throws IOException {
if (readLimit < 0) {
@@ -93,27 +95,28 @@ public void mark(int readLimit) throws IOException {
}
}
- /**
- * Indicates whether this reader supports the {@code mark()} and {@code
- * reset()} methods. This implementation returns {@code true}.
- *
- * @return always {@code true}.
- */
+ /// Indicates whether this reader supports the `mark()` and `reset()` methods. This implementation returns `true`.
+ ///
+ /// #### Returns
+ ///
+ /// always `true`.
@Override
public boolean markSupported() {
return true;
}
- /**
- * Reads a single character from the source string and returns it as an
- * integer with the two higher-order bytes set to 0. Returns -1 if the end
- * of the source string has been reached.
- *
- * @return the character read or -1 if the end of the source string has been
- * reached.
- * @throws IOException
- * if this reader is closed.
- */
+ /// Reads a single character from the source string and returns it as an
+ /// integer with the two higher-order bytes set to 0. Returns -1 if the end
+ /// of the source string has been reached.
+ ///
+ /// #### Returns
+ ///
+ /// @return the character read or -1 if the end of the source string has been
+ /// reached.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if this reader is closed.
@Override
public int read() throws IOException {
synchronized (lock) {
@@ -127,27 +130,33 @@ public int read() throws IOException {
}
}
- /**
- * Reads at most {@code len} characters from the source string and stores
- * them at {@code offset} in the character array {@code buf}. Returns the
- * number of characters actually read or -1 if the end of the source string
- * has been reached.
- *
- * @param buf
- * the character array to store the characters read.
- * @param offset
- * the initial position in {@code buffer} to store the characters
- * read from this reader.
- * @param len
- * the maximum number of characters to read.
- * @return the number of characters read or -1 if the end of the reader has
- * been reached.
- * @throws IndexOutOfBoundsException
- * if {@code offset < 0} or {@code len < 0}, or if
- * {@code offset + len} is greater than the size of {@code buf}.
- * @throws IOException
- * if this reader is closed.
- */
+ /// Reads at most `len` characters from the source string and stores
+ /// them at `offset` in the character array `buf`. Returns the
+ /// number of characters actually read or -1 if the end of the source string
+ /// has been reached.
+ ///
+ /// #### Parameters
+ ///
+ /// - `buf`: the character array to store the characters read.
+ ///
+ /// - `offset`: @param offset
+ /// the initial position in `buffer` to store the characters
+ /// read from this reader.
+ ///
+ /// - `len`: the maximum number of characters to read.
+ ///
+ /// #### Returns
+ ///
+ /// @return the number of characters read or -1 if the end of the reader has
+ /// been reached.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `offset < 0` or `len < 0`, or if
+ /// `offset + len` is greater than the size of `buf`.
+ ///
+ /// - `IOException`: if this reader is closed.
@Override
public int read(char buf[], int offset, int len) throws IOException {
synchronized (lock) {
@@ -177,16 +186,22 @@ public int read(char buf[], int offset, int len) throws IOException {
}
}
- /**
- * Indicates whether this reader is ready to be read without blocking. This
- * implementation always returns {@code true}.
- *
- * @return always {@code true}.
- * @throws IOException
- * if this reader is closed.
- * @see #read()
- * @see #read(char[], int, int)
- */
+ /// Indicates whether this reader is ready to be read without blocking. This
+ /// implementation always returns `true`.
+ ///
+ /// #### Returns
+ ///
+ /// always `true`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if this reader is closed.
+ ///
+ /// #### See also
+ ///
+ /// - #read()
+ ///
+ /// - #read(char[], int, int)
@Override
public boolean ready() throws IOException {
synchronized (lock) {
@@ -197,17 +212,20 @@ public boolean ready() throws IOException {
}
}
- /**
- * Resets this reader's position to the last {@code mark()} location.
- * Invocations of {@code read()} and {@code skip()} will occur from this new
- * location. If this reader has not been marked, it is reset to the
- * beginning of the source string.
- *
- * @throws IOException
- * if this reader is closed.
- * @see #mark(int)
- * @see #markSupported()
- */
+ /// Resets this reader's position to the last `mark()` location.
+ /// Invocations of `read()` and `skip()` will occur from this new
+ /// location. If this reader has not been marked, it is reset to the
+ /// beginning of the source string.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if this reader is closed.
+ ///
+ /// #### See also
+ ///
+ /// - #mark(int)
+ ///
+ /// - #markSupported()
@Override
public void reset() throws IOException {
synchronized (lock) {
@@ -218,26 +236,36 @@ public void reset() throws IOException {
}
}
- /**
- * Moves {@code ns} characters in the source string. Unlike the {@link
- * Reader#skip(long) overridden method}, this method may skip negative skip
- * distances: this rewinds the input so that characters may be read again.
- * When the end of the source string has been reached, the input cannot be
- * rewound.
- *
- * @param ns
- * the maximum number of characters to skip. Positive values skip
- * forward; negative values skip backward.
- * @return the number of characters actually skipped. This is bounded below
- * by the number of characters already read and above by the
- * number of characters remaining: {@code -(num chars already
- * read) <= distance skipped <= num chars remaining}.
- * @throws IOException
- * if this reader is closed.
- * @see #mark(int)
- * @see #markSupported()
- * @see #reset()
- */
+ /// Moves `ns` characters in the source string. Unlike the `overridden method`, this method may skip negative skip
+ /// distances: this rewinds the input so that characters may be read again.
+ /// When the end of the source string has been reached, the input cannot be
+ /// rewound.
+ ///
+ /// #### Parameters
+ ///
+ /// - `ns`: @param ns
+ /// the maximum number of characters to skip. Positive values skip
+ /// forward; negative values skip backward.
+ ///
+ /// #### Returns
+ ///
+ /// @return the number of characters actually skipped. This is bounded below
+ /// by the number of characters already read and above by the
+ /// number of characters remaining:
+ /// `-(num chars already
+ /// read) <= distance skipped <= num chars remaining`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if this reader is closed.
+ ///
+ /// #### See also
+ ///
+ /// - #mark(int)
+ ///
+ /// - #markSupported()
+ ///
+ /// - #reset()
@Override
public long skip(long ns) throws IOException {
synchronized (lock) {
diff --git a/Ports/CLDC11/src/java/io/StringWriter.java b/Ports/CLDC11/src/java/io/StringWriter.java
index ba236ed236..ef98c6769c 100644
--- a/Ports/CLDC11/src/java/io/StringWriter.java
+++ b/Ports/CLDC11/src/java/io/StringWriter.java
@@ -16,10 +16,7 @@
*/
package java.io;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public class StringWriter extends Writer implements Appendable {
private StringBuffer buf;
diff --git a/Ports/CLDC11/src/java/io/UTFDataFormatException.java b/Ports/CLDC11/src/java/io/UTFDataFormatException.java
index 26bacde691..a7ceaac2f5 100644
--- a/Ports/CLDC11/src/java/io/UTFDataFormatException.java
+++ b/Ports/CLDC11/src/java/io/UTFDataFormatException.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.io;
-/**
- * Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface. See the writeUTF method for the format in which UTF-8 strings are read and written.
- * Since: JDK1.0, CLDC 1.0 See Also:DataInput, DataInputStream.readUTF(java.io.DataInput), IOException
- */
+/// Signals that a malformed UTF-8 string has been read in a data input stream or by any class that implements the data input interface. See the writeUTF method for the format in which UTF-8 strings are read and written.
+/// Since: JDK1.0, CLDC 1.0 See Also:DataInput, DataInputStream.readUTF(java.io.DataInput), IOException
public class UTFDataFormatException extends java.io.IOException{
- /**
- * Constructs a UTFDataFormatException with null as its error detail message.
- */
+ /// Constructs a UTFDataFormatException with null as its error detail message.
public UTFDataFormatException(){
//TODO codavaj!!
}
- /**
- * Constructs a UTFDataFormatException with the specified detail message. The string s can be retrieved later by the
- * method of class java.lang.Throwable.
- * s - the detail message.
- */
+ /// Constructs a UTFDataFormatException with the specified detail message. The string s can be retrieved later by the
+ /// method of class java.lang.Throwable.
+ /// s - the detail message.
public UTFDataFormatException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/UnsupportedEncodingException.java b/Ports/CLDC11/src/java/io/UnsupportedEncodingException.java
index 7ae829440e..7e2423b4db 100644
--- a/Ports/CLDC11/src/java/io/UnsupportedEncodingException.java
+++ b/Ports/CLDC11/src/java/io/UnsupportedEncodingException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.io;
-/**
- * The Character Encoding is not supported.
- * Since: JDK1.1, CLDC 1.0
- */
+/// The Character Encoding is not supported.
+/// Since: JDK1.1, CLDC 1.0
public class UnsupportedEncodingException extends java.io.IOException{
- /**
- * Constructs an UnsupportedEncodingException without a detail message.
- */
+ /// Constructs an UnsupportedEncodingException without a detail message.
public UnsupportedEncodingException(){
//TODO codavaj!!
}
- /**
- * Constructs an UnsupportedEncodingException with a detail message.
- * s - Describes the reason for the exception.
- */
+ /// Constructs an UnsupportedEncodingException with a detail message.
+ /// s - Describes the reason for the exception.
public UnsupportedEncodingException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/io/Writer.java b/Ports/CLDC11/src/java/io/Writer.java
index 671f95517d..99b31b10fb 100644
--- a/Ports/CLDC11/src/java/io/Writer.java
+++ b/Ports/CLDC11/src/java/io/Writer.java
@@ -22,71 +22,49 @@
* have any questions.
*/
package java.io;
-/**
- * Abstract class for writing to character streams. The only methods that a subclass must implement are write(char[], int, int), flush(), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
- * Since: JDK1.1, CLDC 1.0 See Also:OutputStreamWriter, Reader
- */
+/// Abstract class for writing to character streams. The only methods that a subclass must implement are write(char[], int, int), flush(), and close(). Most subclasses, however, will override some of the methods defined here in order to provide higher efficiency, additional functionality, or both.
+/// Since: JDK1.1, CLDC 1.0 See Also:OutputStreamWriter, Reader
public abstract class Writer implements AutoCloseable {
- /**
- * The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
- */
+ /// The object used to synchronize operations on this stream. For efficiency, a character-stream object may use an object other than itself to protect critical sections. A subclass should therefore use the object in this field rather than this or a synchronized method.
protected java.lang.Object lock;
- /**
- * Create a new character-stream writer whose critical sections will synchronize on the writer itself.
- */
+ /// Create a new character-stream writer whose critical sections will synchronize on the writer itself.
protected Writer(){
//TODO codavaj!!
}
- /**
- * Create a new character-stream writer whose critical sections will synchronize on the given object.
- * lock - Object to synchronize on.
- */
+ /// Create a new character-stream writer whose critical sections will synchronize on the given object.
+ /// lock - Object to synchronize on.
protected Writer(java.lang.Object lock){
//TODO codavaj!!
}
- /**
- * Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.
- */
+ /// Close the stream, flushing it first. Once a stream has been closed, further write() or flush() invocations will cause an IOException to be thrown. Closing a previously-closed stream, however, has no effect.
public abstract void close() throws java.io.IOException;
- /**
- * Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
- */
+ /// Flush the stream. If the stream has saved any characters from the various write() methods in a buffer, write them immediately to their intended destination. Then, if that destination is another character or byte stream, flush it. Thus one flush() invocation will flush all the buffers in a chain of Writers and OutputStreams.
public abstract void flush() throws java.io.IOException;
- /**
- * Write an array of characters.
- */
+ /// Write an array of characters.
public void write(char[] cbuf) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a portion of an array of characters.
- */
+ /// Write a portion of an array of characters.
public abstract void write(char[] cbuf, int off, int len) throws java.io.IOException;
- /**
- * Write a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.
- * Subclasses that intend to support efficient single-character output should override this method.
- */
+ /// Write a single character. The character to be written is contained in the 16 low-order bits of the given integer value; the 16 high-order bits are ignored.
+ /// Subclasses that intend to support efficient single-character output should override this method.
public void write(int c) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a string.
- */
+ /// Write a string.
public void write(java.lang.String str) throws java.io.IOException{
return; //TODO codavaj!!
}
- /**
- * Write a portion of a string.
- */
+ /// Write a portion of a string.
public void write(java.lang.String str, int off, int len) throws java.io.IOException{
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/AbstractMethodError.java b/Ports/CLDC11/src/java/lang/AbstractMethodError.java
index 0ce0f54462..b8008b8b22 100644
--- a/Ports/CLDC11/src/java/lang/AbstractMethodError.java
+++ b/Ports/CLDC11/src/java/lang/AbstractMethodError.java
@@ -22,10 +22,8 @@
*/
package java.lang;
-/**
- * Exception thrown when an attempt is made to call an abstract method.
- * @author shannah
- */
+/// Exception thrown when an attempt is made to call an abstract method.
+/// @author shannah
public class AbstractMethodError extends Error {
AbstractMethodError() {
diff --git a/Ports/CLDC11/src/java/lang/Appendable.java b/Ports/CLDC11/src/java/lang/Appendable.java
index 55316ec398..34aeaf50c1 100644
--- a/Ports/CLDC11/src/java/lang/Appendable.java
+++ b/Ports/CLDC11/src/java/lang/Appendable.java
@@ -18,70 +18,83 @@
import java.io.IOException;
-/**
- * Declares methods to append characters or character sequences. Any class that
- * implements this interface can receive data formatted by a
- * java.util.Formatter. The appended character or character sequence
- * should be valid according to the rules described in
- * {@link Character Unicode Character Representation}.
- *
- * {@code Appendable} itself does not guarantee thread safety. This
- * responsibility is up to the implementing class.
- *
- * Implementing classes can choose different exception handling mechanism. They
- * can choose to throw exceptions other than {@code IOException} or they do not
- * throw any exceptions at all and use error codes instead.
- */
+/// Declares methods to append characters or character sequences. Any class that
+/// implements this interface can receive data formatted by a
+/// `java.util.Formatter`. The appended character or character sequence
+/// should be valid according to the rules described in
+/// `Unicode Character Representation`.
+///
+/// `Appendable` itself does not guarantee thread safety. This
+/// responsibility is up to the implementing class.
+///
+/// Implementing classes can choose different exception handling mechanism. They
+/// can choose to throw exceptions other than `IOException` or they do not
+/// throw any exceptions at all and use error codes instead.
public interface Appendable {
- /**
- * Appends the specified character.
- *
- * @param c
- * the character to append.
- * @return this {@code Appendable}.
- * @throws IOException
- * if an I/O error occurs.
- */
+ /// Appends the specified character.
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: the character to append.
+ ///
+ /// #### Returns
+ ///
+ /// this `Appendable`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if an I/O error occurs.
Appendable append(char c) throws IOException;
- /**
- * Appends the character sequence {@code csq}. Implementation classes may
- * not append the whole sequence, for example if the target is a buffer with
- * limited size.
- *
- * If {@code csq} is {@code null}, the characters "null" are appended.
- *
- * @param csq
- * the character sequence to append.
- * @return this {@code Appendable}.
- * @throws IOException
- * if an I/O error occurs.
- */
+ /// Appends the character sequence `csq`. Implementation classes may
+ /// not append the whole sequence, for example if the target is a buffer with
+ /// limited size.
+ ///
+ /// If `csq` is `null`, the characters "null" are appended.
+ ///
+ /// #### Parameters
+ ///
+ /// - `csq`: the character sequence to append.
+ ///
+ /// #### Returns
+ ///
+ /// this `Appendable`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IOException`: if an I/O error occurs.
Appendable append(CharSequence csq) throws IOException;
- /**
- * Appends a subsequence of {@code csq}.
- *
- * If {@code csq} is not {@code null} then calling this method is equivalent
- * to calling {@code append(csq.subSequence(start, end))}.
- *
- * If {@code csq} is {@code null}, the characters "null" are appended.
- *
- * @param csq
- * the character sequence to append.
- * @param start
- * the first index of the subsequence of {@code csq} that is
- * appended.
- * @param end
- * the last index of the subsequence of {@code csq} that is
- * appended.
- * @return this {@code Appendable}.
- * @throws IndexOutOfBoundsException
- * if {@code start < 0}, {@code end < 0}, {@code start > end}
- * or {@code end} is greater than the length of {@code csq}.
- * @throws IOException
- * if an I/O error occurs.
- */
+ /// Appends a subsequence of `csq`.
+ ///
+ /// If `csq` is not `null` then calling this method is equivalent
+ /// to calling `append(csq.subSequence(start, end))`.
+ ///
+ /// If `csq` is `null`, the characters "null" are appended.
+ ///
+ /// #### Parameters
+ ///
+ /// - `csq`: the character sequence to append.
+ ///
+ /// - `start`: @param start
+ /// the first index of the subsequence of `csq` that is
+ /// appended.
+ ///
+ /// - `end`: @param end
+ /// the last index of the subsequence of `csq` that is
+ /// appended.
+ ///
+ /// #### Returns
+ ///
+ /// this `Appendable`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `start end`
+ /// or `end` is greater than the length of `csq`.
+ ///
+ /// - `IOException`: if an I/O error occurs.
Appendable append(CharSequence csq, int start, int end) throws IOException;
}
diff --git a/Ports/CLDC11/src/java/lang/ArithmeticException.java b/Ports/CLDC11/src/java/lang/ArithmeticException.java
index c56b101a6b..87a242a9c1 100644
--- a/Ports/CLDC11/src/java/lang/ArithmeticException.java
+++ b/Ports/CLDC11/src/java/lang/ArithmeticException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown when an exceptional arithmetic condition has occurred. For example, an integer "divide by zero" throws an instance of this class.
+/// Since: JDK1.0, CLDC 1.0
public class ArithmeticException extends java.lang.RuntimeException{
- /**
- * Constructs an ArithmeticException with no detail message.
- */
+ /// Constructs an ArithmeticException with no detail message.
public ArithmeticException(){
//TODO codavaj!!
}
- /**
- * Constructs an ArithmeticException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an ArithmeticException with the specified detail message.
+ /// s - the detail message.
public ArithmeticException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/ArrayIndexOutOfBoundsException.java b/Ports/CLDC11/src/java/lang/ArrayIndexOutOfBoundsException.java
index e94938290d..eef2f2963a 100644
--- a/Ports/CLDC11/src/java/lang/ArrayIndexOutOfBoundsException.java
+++ b/Ports/CLDC11/src/java/lang/ArrayIndexOutOfBoundsException.java
@@ -22,30 +22,22 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that an array has been accessed with an illegal index. The index is either negative or greater than or equal to the size of the array.
+/// Since: JDK1.0, CLDC 1.0
public class ArrayIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException{
- /**
- * Constructs an ArrayIndexOutOfBoundsException with no detail message.
- */
+ /// Constructs an ArrayIndexOutOfBoundsException with no detail message.
public ArrayIndexOutOfBoundsException(){
//TODO codavaj!!
}
- /**
- * Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
- * index - the illegal index.
- */
+ /// Constructs a new ArrayIndexOutOfBoundsException class with an argument indicating the illegal index.
+ /// index - the illegal index.
public ArrayIndexOutOfBoundsException(int index){
//TODO codavaj!!
}
- /**
- * Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an ArrayIndexOutOfBoundsException class with the specified detail message.
+ /// s - the detail message.
public ArrayIndexOutOfBoundsException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/ArrayStoreException.java b/Ports/CLDC11/src/java/lang/ArrayStoreException.java
index 5f64cce0ad..c1f584ec45 100644
--- a/Ports/CLDC11/src/java/lang/ArrayStoreException.java
+++ b/Ports/CLDC11/src/java/lang/ArrayStoreException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. For example, the following code generates an ArrayStoreException:
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that an attempt has been made to store the wrong type of object into an array of objects. For example, the following code generates an ArrayStoreException:
+/// Since: JDK1.0, CLDC 1.0
public class ArrayStoreException extends java.lang.RuntimeException{
- /**
- * Constructs an ArrayStoreException with no detail message.
- */
+ /// Constructs an ArrayStoreException with no detail message.
public ArrayStoreException(){
//TODO codavaj!!
}
- /**
- * Constructs an ArrayStoreException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an ArrayStoreException with the specified detail message.
+ /// s - the detail message.
public ArrayStoreException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/AssertionError.java b/Ports/CLDC11/src/java/lang/AssertionError.java
index 93e2d59962..fd3cc9819d 100644
--- a/Ports/CLDC11/src/java/lang/AssertionError.java
+++ b/Ports/CLDC11/src/java/lang/AssertionError.java
@@ -23,10 +23,7 @@
*/
package java.lang;
-/**
- *
- * @author shai
- */
+/// @author shai
public class AssertionError extends Error {
public AssertionError() {
super();
diff --git a/Ports/CLDC11/src/java/lang/Boolean.java b/Ports/CLDC11/src/java/lang/Boolean.java
index 2a37f37e53..b06e8237fc 100644
--- a/Ports/CLDC11/src/java/lang/Boolean.java
+++ b/Ports/CLDC11/src/java/lang/Boolean.java
@@ -22,62 +22,50 @@
* have any questions.
*/
package java.lang;
-/**
- * The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean.
+/// Since: JDK1.0, CLDC 1.0
public final class Boolean{
- /**
- * The Boolean object corresponding to the primitive value false.
- */
+ /// The Boolean object corresponding to the primitive value false.
public static final java.lang.Boolean FALSE=null;
- /**
- * The Boolean object corresponding to the primitive value true.
- */
+ /// The Boolean object corresponding to the primitive value true.
public static final java.lang.Boolean TRUE=null;
- /**
- * Allocates a Boolean object representing the value argument.
- * value - the value of the Boolean.
- */
+ /// Allocates a Boolean object representing the value argument.
+ /// value - the value of the Boolean.
public Boolean(boolean value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Boolean object as a boolean primitive.
- */
+ /// Returns the value of this Boolean object as a boolean primitive.
public boolean booleanValue(){
return false; //TODO codavaj!!
}
- /**
- * Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
- */
+ /// Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns a hash code for this Boolean object.
- */
+ /// Returns a hash code for this Boolean object.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a String object representing this Boolean's value. If this object represents the value true, a string equal to "true" is returned. Otherwise, a string equal to "false" is returned.
- */
+ /// Returns a String object representing this Boolean's value. If this object represents the value true, a string equal to "true" is returned. Otherwise, a string equal to "false" is returned.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param b the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `b`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Boolean valueOf(final boolean b) {
return b ? Boolean.TRUE : Boolean.FALSE;
}
diff --git a/Ports/CLDC11/src/java/lang/Byte.java b/Ports/CLDC11/src/java/lang/Byte.java
index 9bf1c14c0f..76bac16f98 100644
--- a/Ports/CLDC11/src/java/lang/Byte.java
+++ b/Ports/CLDC11/src/java/lang/Byte.java
@@ -22,81 +22,65 @@
* have any questions.
*/
package java.lang;
-/**
- * The Byte class is the standard wrapper for byte values.
- * Since: JDK1.1, CLDC 1.0
- */
+/// The Byte class is the standard wrapper for byte values.
+/// Since: JDK1.1, CLDC 1.0
public final class Byte extends Number implements Comparable {
public static final Class TYPE = byte.class;
public static final int SIZE = 8;
- /**
- * The maximum value a Byte can have.
- * See Also:Constant Field Values
- */
+ /// The maximum value a Byte can have.
+ /// See Also:Constant Field Values
public static final byte MAX_VALUE=127;
- /**
- * The minimum value a Byte can have.
- * See Also:Constant Field Values
- */
+ /// The minimum value a Byte can have.
+ /// See Also:Constant Field Values
public static final byte MIN_VALUE=-128;
- /**
- * Constructs a Byte object initialized to the specified byte value.
- * value - the initial value of the Byte
- */
+ /// Constructs a Byte object initialized to the specified byte value.
+ /// value - the initial value of the Byte
public Byte(byte value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Byte as a byte.
- */
+ /// Returns the value of this Byte as a byte.
public byte byteValue(){
return 0; //TODO codavaj!!
}
- /**
- * Compares this object to the specified object.
- */
+ /// Compares this object to the specified object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this Byte.
- */
+ /// Returns a hashcode for this Byte.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.
- */
+ /// Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte. The radix is assumed to be 10.
public static byte parseByte(java.lang.String s) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte.
- */
+ /// Assuming the specified String represents a byte, returns that byte's value. Throws an exception if the String cannot be parsed as a byte.
public static byte parseByte(java.lang.String s, int radix) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Returns a String object representing this Byte's value.
- */
+ /// Returns a String object representing this Byte's value.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Byte valueOf(byte i) {
return null;
}
diff --git a/Ports/CLDC11/src/java/lang/CharSequence.java b/Ports/CLDC11/src/java/lang/CharSequence.java
index c763765ffe..a84f1d9c02 100644
--- a/Ports/CLDC11/src/java/lang/CharSequence.java
+++ b/Ports/CLDC11/src/java/lang/CharSequence.java
@@ -18,57 +18,67 @@
package java.lang;
-/**
- * This interface represents an ordered set of characters and defines the
- * methods to probe them.
- */
+/// This interface represents an ordered set of characters and defines the
+/// methods to probe them.
public interface CharSequence {
- /**
- * Returns the number of characters in this sequence.
- *
- * @return the number of characters.
- */
+ /// Returns the number of characters in this sequence.
+ ///
+ /// #### Returns
+ ///
+ /// the number of characters.
public int length();
- /**
- * Returns the character at the specified index, with the first character
- * having index zero.
- *
- * @param index
- * the index of the character to return.
- * @return the requested character.
- * @throws IndexOutOfBoundsException
- * if {@code index < 0} or {@code index} is greater than the
- * length of this sequence.
- */
+ /// Returns the character at the specified index, with the first character
+ /// having index zero.
+ ///
+ /// #### Parameters
+ ///
+ /// - `index`: the index of the character to return.
+ ///
+ /// #### Returns
+ ///
+ /// the requested character.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `index < 0` or `index` is greater than the
+ /// length of this sequence.
public char charAt(int index);
- /**
- * Returns a {@code CharSequence} from the {@code start} index (inclusive)
- * to the {@code end} index (exclusive) of this sequence.
- *
- * @param start
- * the start offset of the sub-sequence. It is inclusive, that
- * is, the index of the first character that is included in the
- * sub-sequence.
- * @param end
- * the end offset of the sub-sequence. It is exclusive, that is,
- * the index of the first character after those that are included
- * in the sub-sequence
- * @return the requested sub-sequence.
- * @throws IndexOutOfBoundsException
- * if {@code start < 0}, {@code end < 0}, {@code start > end},
- * or if {@code start} or {@code end} are greater than the
- * length of this sequence.
- */
+ /// Returns a `CharSequence` from the `start` index (inclusive)
+ /// to the `end` index (exclusive) of this sequence.
+ ///
+ /// #### Parameters
+ ///
+ /// - `start`: @param start
+ /// the start offset of the sub-sequence. It is inclusive, that
+ /// is, the index of the first character that is included in the
+ /// sub-sequence.
+ ///
+ /// - `end`: @param end
+ /// the end offset of the sub-sequence. It is exclusive, that is,
+ /// the index of the first character after those that are included
+ /// in the sub-sequence
+ ///
+ /// #### Returns
+ ///
+ /// the requested sub-sequence.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `start end`,
+ /// or if `start` or `end` are greater than the
+ /// length of this sequence.
public CharSequence subSequence(int start, int end);
- /**
- * Returns a string with the same characters in the same order as in this
- * sequence.
- *
- * @return a string based on this sequence.
- */
+ /// Returns a string with the same characters in the same order as in this
+ /// sequence.
+ ///
+ /// #### Returns
+ ///
+ /// a string based on this sequence.
public String toString();
}
diff --git a/Ports/CLDC11/src/java/lang/Character.java b/Ports/CLDC11/src/java/lang/Character.java
index a136ea0bfd..0d937bd21d 100644
--- a/Ports/CLDC11/src/java/lang/Character.java
+++ b/Ports/CLDC11/src/java/lang/Character.java
@@ -22,352 +22,342 @@
* have any questions.
*/
package java.lang;
-/**
- * The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field whose type is char.
- * In addition, this class provides several methods for determining the type of a character and converting characters from uppercase to lowercase and vice versa.
- * Character information is based on the Unicode Standard, version 3.0. However, in order to reduce footprint, by default the character property and case conversion operations in CLDC are available only for the ISO Latin-1 range of characters. Other Unicode character blocks can be supported as necessary.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The Character class wraps a value of the primitive type char in an object. An object of type Character contains a single field whose type is char.
+/// In addition, this class provides several methods for determining the type of a character and converting characters from uppercase to lowercase and vice versa.
+/// Character information is based on the Unicode Standard, version 3.0. However, in order to reduce footprint, by default the character property and case conversion operations in CLDC are available only for the ISO Latin-1 range of characters. Other Unicode character blocks can be supported as necessary.
+/// Since: JDK1.0, CLDC 1.0
public final class Character{
- /**
- * The maximum radix available for conversion to and from Strings.
- * See Also:Integer.toString(int, int), Integer.valueOf(java.lang.String), Constant Field Values
- */
+ /// The maximum radix available for conversion to and from Strings.
+ /// See Also:Integer.toString(int, int), Integer.valueOf(java.lang.String), Constant Field Values
public static final int MAX_RADIX=36;
- /**
- * The constant value of this field is the largest value of type char.
- * Since: JDK1.0.2 See Also:Constant Field Values
- */
+ /// The constant value of this field is the largest value of type char.
+ /// Since: JDK1.0.2 See Also:Constant Field Values
public static final char MAX_VALUE=(char)65535;
- /**
- * The minimum radix available for conversion to and from Strings.
- * See Also:Integer.toString(int, int), Integer.valueOf(java.lang.String), Constant Field Values
- */
+ /// The minimum radix available for conversion to and from Strings.
+ /// See Also:Integer.toString(int, int), Integer.valueOf(java.lang.String), Constant Field Values
public static final int MIN_RADIX=2;
- /**
- * The constant value of this field is the smallest value of type char.
- * Since: JDK1.0.2 See Also:Constant Field Values
- */
+ /// The constant value of this field is the smallest value of type char.
+ /// Since: JDK1.0.2 See Also:Constant Field Values
public static final char MIN_VALUE=(char)0;
- /**
- * Constructs a Character object and initializes it so that it represents the primitive value argument.
- * value - value for the new Character object.
- */
+ /// Constructs a Character object and initializes it so that it represents the primitive value argument.
+ /// value - value for the new Character object.
public Character(char value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Character object.
- */
+ /// Returns the value of this Character object.
public char charValue(){
return ' '; //TODO codavaj!!
}
- /**
- * Returns the numeric value of the character ch in the specified radix.
- */
+ /// Returns the numeric value of the character ch in the specified radix.
public static int digit(char ch, int radix){
return 0; //TODO codavaj!!
}
- /**
- * Compares this object against the specified object. The result is true if and only if the argument is not null and is a Character object that represents the same char value as this object.
- */
+ /// Compares this object against the specified object. The result is true if and only if the argument is not null and is a Character object that represents the same char value as this object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns a hash code for this Character.
- */
+ /// Returns a hash code for this Character.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Determines if the specified character is alphabetic.
- */
+ /// Determines if the specified character is alphabetic.
static boolean isLetterCompat(char ch){
return isLowerCase(ch) || isUpperCase(ch);
}
- /**
- * Determines if the specified character is numeric.
- */
+ /// Determines if the specified character is numeric.
static boolean isDigitCompat(char ch){
return isDigit(ch);
}
- /**
- * Determines if the specified character is alphabetic or numeric.
- */
+ /// Determines if the specified character is alphabetic or numeric.
static boolean isLetterOrDigitCompat(char ch){
return isLetterCompat(ch) || isDigitCompat(ch);
}
- /**
- * Determines if the specified character is a digit.
- */
+ /// Determines if the specified character is a digit.
public static boolean isDigit(char ch){
return false; //TODO codavaj!!
}
- /**
- * Determines if the specified character is a lowercase character.
- * Note that by default CLDC only supports the ISO Latin-1 range of characters.
- * Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are lowercase:
- * a b c d e f g h i j k l m n o p q r s t u v w x y z u00DF u00E0 u00E1 u00E2 u00E3 u00E4 u00E5 u00E6 u00E7 u00E8 u00E9 u00EA u00EB u00EC u00ED u00EE u00EF u00F0 u00F1 u00F2 u00F3 u00F4 u00F5 u00F6 u00F8 u00F9 u00FA u00FB u00FC u00FD u00FE u00FF
- */
+ /// Determines if the specified character is a lowercase character.
+ /// Note that by default CLDC only supports the ISO Latin-1 range of characters.
+ /// Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are lowercase:
+ /// a b c d e f g h i j k l m n o p q r s t u v w x y z u00DF u00E0 u00E1 u00E2 u00E3 u00E4 u00E5 u00E6 u00E7 u00E8 u00E9 u00EA u00EB u00EC u00ED u00EE u00EF u00F0 u00F1 u00F2 u00F3 u00F4 u00F5 u00F6 u00F8 u00F9 u00FA u00FB u00FC u00FD u00FE u00FF
public static boolean isLowerCase(char ch){
return false; //TODO codavaj!!
}
- /**
- * Determines if the specified character is an uppercase character.
- * Note that by default CLDC only supports the ISO Latin-1 range of characters.
- * Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are uppercase:
- * A B C D E F G H I J K L M N O P Q R S T U V W X Y Z u00C0 u00C1 u00C2 u00C3 u00C4 u00C5 u00C6 u00C7 u00C8 u00C9 u00CA u00CB u00CC u00CD u00CE u00CF u00D0 u00D1 u00D2 u00D3 u00D4 u00D5 u00D6 u00D8 u00D9 u00DA u00DB u00DC u00DD u00DE
- */
+ /// Determines if the specified character is an uppercase character.
+ /// Note that by default CLDC only supports the ISO Latin-1 range of characters.
+ /// Of the ISO Latin-1 characters (character codes 0x0000 through 0x00FF), the following are uppercase:
+ /// A B C D E F G H I J K L M N O P Q R S T U V W X Y Z u00C0 u00C1 u00C2 u00C3 u00C4 u00C5 u00C6 u00C7 u00C8 u00C9 u00CA u00CB u00CC u00CD u00CE u00CF u00D0 u00D1 u00D2 u00D3 u00D4 u00D5 u00D6 u00D8 u00D9 u00DA u00DB u00DC u00DD u00DE
public static boolean isUpperCase(char ch){
return false; //TODO codavaj!!
}
- /**
- * The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned.
- * Note that by default CLDC only supports the ISO Latin-1 range of characters.
- */
+ /// The given character is mapped to its lowercase equivalent; if the character has no lowercase equivalent, the character itself is returned.
+ /// Note that by default CLDC only supports the ISO Latin-1 range of characters.
public static char toLowerCase(char ch){
return ' '; //TODO codavaj!!
}
- /**
- * Returns a String object representing this character's value. Converts this Character object to a string. The result is a string whose length is 1. The string's sole component is the primitive char value represented by this object.
- */
+ /// Returns a String object representing this character's value. Converts this Character object to a string. The result is a string whose length is 1. The string's sole component is the primitive char value represented by this object.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Converts the character argument to uppercase; if the character has no uppercase equivalent, the character itself is returned.
- * Note that by default CLDC only supports the ISO Latin-1 range of characters.
- */
+ /// Converts the character argument to uppercase; if the character has no uppercase equivalent, the character itself is returned.
+ /// Note that by default CLDC only supports the ISO Latin-1 range of characters.
public static char toUpperCase(char ch){
return ' '; //TODO codavaj!!
}
- /**
- *
- * Minimum value of a high surrogate or leading surrogate unit in UTF-16
- * encoding - '\uD800'.
- *
- *
- * @since 1.5
- */
+ /// Minimum value of a high surrogate or leading surrogate unit in UTF-16
+ /// encoding - `'\uD800'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MIN_HIGH_SURROGATE = '\uD800';
- /**
- *
- * Maximum value of a high surrogate or leading surrogate unit in UTF-16
- * encoding - '\uDBFF'.
- *
- *
- * @since 1.5
- */
+ /// Maximum value of a high surrogate or leading surrogate unit in UTF-16
+ /// encoding - `'\uDBFF'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MAX_HIGH_SURROGATE = '\uDBFF';
- /**
- *
- * Minimum value of a low surrogate or trailing surrogate unit in UTF-16
- * encoding - '\uDC00'.
- *
- *
- * @since 1.5
- */
+ /// Minimum value of a low surrogate or trailing surrogate unit in UTF-16
+ /// encoding - `'\uDC00'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MIN_LOW_SURROGATE = '\uDC00';
- /**
- * Maximum value of a low surrogate or trailing surrogate unit in UTF-16
- * encoding - '\uDFFF'.
- *
- *
- * @since 1.5
- */
+ /// Maximum value of a low surrogate or trailing surrogate unit in UTF-16
+ /// encoding - `'\uDFFF'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MAX_LOW_SURROGATE = '\uDFFF';
- /**
- *
- * Minimum value of a surrogate unit in UTF-16 encoding - '\uD800'.
- *
- *
- * @since 1.5
- */
+ /// Minimum value of a surrogate unit in UTF-16 encoding - `'\uD800'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MIN_SURROGATE = '\uD800';
- /**
- *
- * Maximum value of a surrogate unit in UTF-16 encoding - '\uDFFF'.
- *
- *
- * @since 1.5
- */
+ /// Maximum value of a surrogate unit in UTF-16 encoding - `'\uDFFF'`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final char MAX_SURROGATE = '\uDFFF';
- /**
- *
- * Minimum value of a supplementary code point - U+010000.
- *
- *
- * @since 1.5
- */
+ /// Minimum value of a supplementary code point - `U+010000`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final int MIN_SUPPLEMENTARY_CODE_POINT = 0x10000;
- /**
- *
- * Minimum code point value - U+0000.
- *
- *
- * @since 1.5
- */
+ /// Minimum code point value - `U+0000`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final int MIN_CODE_POINT = 0x000000;
- /**
- *
- * Maximum code point value - U+10FFFF.
- *
- *
- * @since 1.5
- */
+ /// Maximum code point value - `U+10FFFF`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final int MAX_CODE_POINT = 0x10FFFF;
- /**
- *
- * Constant for the number of bits to represent a char in
- * two's compliment form.
- *
- *
- * @since 1.5
- */
+ /// Constant for the number of bits to represent a `char` in
+ /// two's compliment form.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static final int SIZE = 16;
- /**
- *
- * A test for determining if the codePoint is a valid Unicode
- * code point.
- *
- *
- * @param codePoint The code point to test.
- * @return A boolean value.
- * @since 1.5
- */
+ /// A test for determining if the `codePoint` is a valid Unicode
+ /// code point.
+ ///
+ /// #### Parameters
+ ///
+ /// - `codePoint`: The code point to test.
+ ///
+ /// #### Returns
+ ///
+ /// A boolean value.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static boolean isValidCodePoint(int codePoint) {
return (MIN_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint);
}
- /**
- *
- * A test for determining if the codePoint is within the
- * supplementary code point range.
- *
- *
- * @param codePoint The code point to test.
- * @return A boolean value.
- * @since 1.5
- */
+ /// A test for determining if the `codePoint` is within the
+ /// supplementary code point range.
+ ///
+ /// #### Parameters
+ ///
+ /// - `codePoint`: The code point to test.
+ ///
+ /// #### Returns
+ ///
+ /// A boolean value.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static boolean isSupplementaryCodePoint(int codePoint) {
return (MIN_SUPPLEMENTARY_CODE_POINT <= codePoint && MAX_CODE_POINT >= codePoint);
}
- /**
- *
- * A test for determining if the char is a high
- * surrogate/leading surrogate unit that's used for representing
- * supplementary characters in UTF-16 encoding.
- *
- *
- * @param ch The char unit to test.
- * @return A boolean value.
- * @since 1.5
- * @see #isLowSurrogate(char)
- */
+ /// A test for determining if the `char` is a high
+ /// surrogate/leading surrogate unit that's used for representing
+ /// supplementary characters in UTF-16 encoding.
+ ///
+ /// #### Parameters
+ ///
+ /// - `ch`: The `char` unit to test.
+ ///
+ /// #### Returns
+ ///
+ /// A boolean value.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
+ ///
+ /// #### See also
+ ///
+ /// - #isLowSurrogate(char)
public static boolean isHighSurrogate(char ch) {
return (MIN_HIGH_SURROGATE <= ch && MAX_HIGH_SURROGATE >= ch);
}
- /**
- *
- * A test for determining if the char is a high
- * surrogate/leading surrogate unit that's used for representing
- * supplementary characters in UTF-16 encoding.
- *
- *
- * @param ch The char unit to test.
- * @return A boolean value.
- * @since 1.5
- * @see #isHighSurrogate(char)
- */
+ /// A test for determining if the `char` is a high
+ /// surrogate/leading surrogate unit that's used for representing
+ /// supplementary characters in UTF-16 encoding.
+ ///
+ /// #### Parameters
+ ///
+ /// - `ch`: The `char` unit to test.
+ ///
+ /// #### Returns
+ ///
+ /// A boolean value.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
+ ///
+ /// #### See also
+ ///
+ /// - #isHighSurrogate(char)
public static boolean isLowSurrogate(char ch) {
return (MIN_LOW_SURROGATE <= ch && MAX_LOW_SURROGATE >= ch);
}
- /**
- *
- * A test for determining if the char pair is a valid
- * surrogate pair.
- *
- *
- * @param high The high surrogate unit to test.
- * @param low The low surrogate unit to test.
- * @return A boolean value.
- * @since 1.5
- * @see #isHighSurrogate(char)
- * @see #isLowSurrogate(char)
- */
+ /// A test for determining if the `char` pair is a valid
+ /// surrogate pair.
+ ///
+ /// #### Parameters
+ ///
+ /// - `high`: The high surrogate unit to test.
+ ///
+ /// - `low`: The low surrogate unit to test.
+ ///
+ /// #### Returns
+ ///
+ /// A boolean value.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
+ ///
+ /// #### See also
+ ///
+ /// - #isHighSurrogate(char)
+ ///
+ /// - #isLowSurrogate(char)
public static boolean isSurrogatePair(char high, char low) {
return (isHighSurrogate(high) && isLowSurrogate(low));
}
- /**
- *
- * Calculates the number of char values required to represent
- * the Unicode code point. This method only tests if the
- * codePoint is greater than or equal to 0x10000,
- * in which case 2 is returned, otherwise 1.
- * To test if the code point is valid, use the
- * {@link #isValidCodePoint(int)} method.
- *
- *
- * @param codePoint The code point to test.
- * @return An int value of 2 or 1.
- * @since 1.5
- * @see #isValidCodePoint(int)
- * @see #isSupplementaryCodePoint(int)
- */
+ /// Calculates the number of `char` values required to represent
+ /// the Unicode code point. This method only tests if the
+ /// `codePoint` is greater than or equal to `0x10000`,
+ /// in which case `2` is returned, otherwise `1`.
+ /// To test if the code point is valid, use the
+ /// `#isValidCodePoint(int)` method.
+ ///
+ /// #### Parameters
+ ///
+ /// - `codePoint`: The code point to test.
+ ///
+ /// #### Returns
+ ///
+ /// An `int` value of 2 or 1.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
+ ///
+ /// #### See also
+ ///
+ /// - #isValidCodePoint(int)
+ ///
+ /// - #isSupplementaryCodePoint(int)
public static int charCount(int codePoint) {
return (codePoint >= 0x10000 ? 2 : 1);
}
- /**
- *
- * Converts a surrogate pair into a Unicode code point. This method assume
- * that the pair are valid surrogates. If the pair are NOT valid surrogates,
- * then the result is indeterminate. The
- * {@link #isSurrogatePair(char, char)} method should be used prior to this
- * method to validate the pair.
- *
- *
- * @param high The high surrogate unit.
- * @param low The low surrogate unit.
- * @return The decoded code point.
- * @since 1.5
- * @see #isSurrogatePair(char, char)
- */
+ /// Converts a surrogate pair into a Unicode code point. This method assume
+ /// that the pair are valid surrogates. If the pair are NOT valid surrogates,
+ /// then the result is indeterminate. The
+ /// `char)` method should be used prior to this
+ /// method to validate the pair.
+ ///
+ /// #### Parameters
+ ///
+ /// - `high`: The high surrogate unit.
+ ///
+ /// - `low`: The low surrogate unit.
+ ///
+ /// #### Returns
+ ///
+ /// The decoded code point.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
+ ///
+ /// #### See also
+ ///
+ /// - #isSurrogatePair(char, char)
public static int toCodePoint(char high, char low) {
// See RFC 2781, Section 2.2
// http://www.faqs.org/rfcs/rfc2781.html
@@ -376,25 +366,34 @@ public static int toCodePoint(char high, char low) {
return (h | l) + 0x10000;
}
- /**
- *
- * Returns the code point at the index in the CharSequence.
- * If char unit at the index is a high-surrogate unit, the
- * next index is less than the length of the sequence and the
- * char unit at the next index is a low surrogate unit, then
- * the code point represented by the pair is returned; otherwise the
- * char unit at the index is returned.
- *
- *
- * @param seq The sequence of char units.
- * @param index The index into the seq to retrieve and
- * convert.
- * @return The Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if the index is negative
- * or greater than or equal to seq.length().
- * @since 1.5
- */
+ /// Returns the code point at the index in the `CharSequence`.
+ /// If `char` unit at the index is a high-surrogate unit, the
+ /// next index is less than the length of the sequence and the
+ /// `char` unit at the next index is a low surrogate unit, then
+ /// the code point represented by the pair is returned; otherwise the
+ /// `char` unit at the index is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The sequence of `char` units.
+ ///
+ /// - `index`: @param index The index into the `seq` to retrieve and
+ /// convert.
+ ///
+ /// #### Returns
+ ///
+ /// The Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if the `index` is negative
+ /// or greater than or equal to `seq.length()`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointAt(CharSequence seq, int index) {
if (seq == null) {
throw new NullPointerException();
@@ -415,25 +414,34 @@ public static int codePointAt(CharSequence seq, int index) {
return high;
}
- /**
- *
- * Returns the code point at the index in the char[]. If
- * char unit at the index is a high-surrogate unit, the next
- * index is less than the length of the sequence and the char
- * unit at the next index is a low surrogate unit, then the code point
- * represented by the pair is returned; otherwise the char
- * unit at the index is returned.
- *
- *
- * @param seq The sequence of char units.
- * @param index The index into the seq to retrieve and
- * convert.
- * @return The Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if the index is negative
- * or greater than or equal to seq.length().
- * @since 1.5
- */
+ /// Returns the code point at the index in the `char[]`. If
+ /// `char` unit at the index is a high-surrogate unit, the next
+ /// index is less than the length of the sequence and the `char`
+ /// unit at the next index is a low surrogate unit, then the code point
+ /// represented by the pair is returned; otherwise the `char`
+ /// unit at the index is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The sequence of `char` units.
+ ///
+ /// - `index`: @param index The index into the `seq` to retrieve and
+ /// convert.
+ ///
+ /// #### Returns
+ ///
+ /// The Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if the `index` is negative
+ /// or greater than or equal to `seq.length()`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointAt(char[] seq, int index) {
if (seq == null) {
throw new NullPointerException();
@@ -454,29 +462,39 @@ public static int codePointAt(char[] seq, int index) {
return high;
}
- /**
- *
- * Returns the code point at the index in the char[] that's
- * within the limit. If char unit at the index is a
- * high-surrogate unit, the next index is less than the limit
- * and the char unit at the next index is a low surrogate
- * unit, then the code point represented by the pair is returned; otherwise
- * the char unit at the index is returned.
- *
- *
- * @param seq The sequence of char units.
- * @param index The index into the seq to retrieve and
- * convert.
- * @param limit The exclusive index into the seq that marks
- * the end of the units that can be used.
- * @return The Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if the index is
- * negative, greater than or equal to limit,
- * limit is negative or limit is
- * greater than the length of seq.
- * @since 1.5
- */
+ /// Returns the code point at the index in the `char[]` that's
+ /// within the limit. If `char` unit at the index is a
+ /// high-surrogate unit, the next index is less than the `limit`
+ /// and the `char` unit at the next index is a low surrogate
+ /// unit, then the code point represented by the pair is returned; otherwise
+ /// the `char` unit at the index is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The sequence of `char` units.
+ ///
+ /// - `index`: @param index The index into the `seq` to retrieve and
+ /// convert.
+ ///
+ /// - `limit`: @param limit The exclusive index into the `seq` that marks
+ /// the end of the units that can be used.
+ ///
+ /// #### Returns
+ ///
+ /// The Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if the `index` is
+ /// negative, greater than or equal to `limit`,
+ /// `limit` is negative or `limit` is
+ /// greater than the length of `seq`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointAt(char[] seq, int index, int limit) {
if (index < 0 || index >= limit || limit < 0 || limit > seq.length) {
throw new IndexOutOfBoundsException();
@@ -493,26 +511,35 @@ public static int codePointAt(char[] seq, int index, int limit) {
return high;
}
- /**
- *
- * Returns the Unicode code point that proceeds the index in
- * the CharSequence. If the char unit at
- * index - 1 is within the low surrogate range, the value
- * index - 2 isn't negative and the char unit
- * at index - 2 is within the high surrogate range, then the
- * supplementary code point made up of the surrogate pair is returned;
- * otherwise, the char value at index - 1 is
- * returned.
- *
- *
- * @param seq The CharSequence to search.
- * @param index The index into the seq.
- * @return A Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if index is less than 1
- * or greater than seq.length().
- * @since 1.5
- */
+ /// Returns the Unicode code point that proceeds the `index` in
+ /// the `CharSequence`. If the `char` unit at
+ /// `index - 1` is within the low surrogate range, the value
+ /// `index - 2` isn't negative and the `char` unit
+ /// at `index - 2` is within the high surrogate range, then the
+ /// supplementary code point made up of the surrogate pair is returned;
+ /// otherwise, the `char` value at `index - 1` is
+ /// returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `CharSequence` to search.
+ ///
+ /// - `index`: The index into the `seq`.
+ ///
+ /// #### Returns
+ ///
+ /// A Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `index` is less than 1
+ /// or greater than `seq.length()`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointBefore(CharSequence seq, int index) {
if (seq == null) {
throw new NullPointerException();
@@ -533,26 +560,35 @@ public static int codePointBefore(CharSequence seq, int index) {
return low;
}
- /**
- *
- * Returns the Unicode code point that proceeds the index in
- * the char[]. If the char unit at
- * index - 1 is within the low surrogate range, the value
- * index - 2 isn't negative and the char unit
- * at index - 2 is within the high surrogate range, then the
- * supplementary code point made up of the surrogate pair is returned;
- * otherwise, the char value at index - 1 is
- * returned.
- *
- *
- * @param seq The char[] to search.
- * @param index The index into the seq.
- * @return A Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if index is less than 1
- * or greater than seq.length.
- * @since 1.5
- */
+ /// Returns the Unicode code point that proceeds the `index` in
+ /// the `char[]`. If the `char` unit at
+ /// `index - 1` is within the low surrogate range, the value
+ /// `index - 2` isn't negative and the `char` unit
+ /// at `index - 2` is within the high surrogate range, then the
+ /// supplementary code point made up of the surrogate pair is returned;
+ /// otherwise, the `char` value at `index - 1` is
+ /// returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `char[]` to search.
+ ///
+ /// - `index`: The index into the `seq`.
+ ///
+ /// #### Returns
+ ///
+ /// A Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `index` is less than 1
+ /// or greater than `seq.length`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointBefore(char[] seq, int index) {
if (seq == null) {
throw new NullPointerException();
@@ -573,30 +609,39 @@ public static int codePointBefore(char[] seq, int index) {
return low;
}
- /**
- *
- * Returns the Unicode code point that proceeds the index in
- * the char[] and isn't less than start. If
- * the char unit at index - 1 is within the
- * low surrogate range, the value index - 2 isn't less than
- * start and the char unit at
- * index - 2 is within the high surrogate range, then the
- * supplementary code point made up of the surrogate pair is returned;
- * otherwise, the char value at index - 1 is
- * returned.
- *
- *
- * @param seq The char[] to search.
- * @param index The index into the seq.
- * @return A Unicode code point.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if index is less than or
- * equal to start, index is greater
- * than seq.length, start is not
- * negative and start is greater than
- * seq.length.
- * @since 1.5
- */
+ /// Returns the Unicode code point that proceeds the `index` in
+ /// the `char[]` and isn't less than `start`. If
+ /// the `char` unit at `index - 1` is within the
+ /// low surrogate range, the value `index - 2` isn't less than
+ /// `start` and the `char` unit at
+ /// `index - 2` is within the high surrogate range, then the
+ /// supplementary code point made up of the surrogate pair is returned;
+ /// otherwise, the `char` value at `index - 1` is
+ /// returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `char[]` to search.
+ ///
+ /// - `index`: The index into the `seq`.
+ ///
+ /// #### Returns
+ ///
+ /// A Unicode code point.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `index` is less than or
+ /// equal to `start`, `index` is greater
+ /// than `seq.length`, `start` is not
+ /// negative and `start` is greater than
+ /// `seq.length`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointBefore(char[] seq, int index, int start) {
if (seq == null) {
throw new NullPointerException();
@@ -617,28 +662,39 @@ public static int codePointBefore(char[] seq, int index, int start) {
return low;
}
- /**
- *
- * Converts the Unicode code point, codePoint, into a UTF-16
- * encoded sequence and copies the value(s) into the
- * char[]dst, starting at the index
- * dstIndex.
- *
- *
- * @param codePoint The Unicode code point to encode.
- * @param dst The char[] to copy the encoded value into.
- * @param dstIndex The index to start copying into dst.
- * @return The number of char value units copied into
- * dst.
- * @throws IllegalArgumentException if codePoint is not a
- * valid Unicode code point.
- * @throws NullPointerException if dst is null.
- * @throws IndexOutOfBoundsException if dstIndex is negative,
- * greater than or equal to dst.length or equals
- * dst.length - 1 when codePoint is a
- * {@link #isSupplementaryCodePoint(int) supplementary code point}.
- * @since 1.5
- */
+ /// Converts the Unicode code point, `codePoint`, into a UTF-16
+ /// encoded sequence and copies the value(s) into the
+ /// `char[]` `dst`, starting at the index
+ /// `dstIndex`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `codePoint`: The Unicode code point to encode.
+ ///
+ /// - `dst`: The `char[]` to copy the encoded value into.
+ ///
+ /// - `dstIndex`: The index to start copying into `dst`.
+ ///
+ /// #### Returns
+ ///
+ /// @return The number of `char` value units copied into
+ /// `dst`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException if `codePoint` is not a
+ /// valid Unicode code point.
+ ///
+ /// - `NullPointerException`: if `dst` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `dstIndex` is negative,
+ /// greater than or equal to `dst.length` or equals
+ /// `dst.length - 1` when `codePoint` is a
+ /// `supplementary code point`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int toChars(int codePoint, char[] dst, int dstIndex) {
if (!isValidCodePoint(codePoint)) {
throw new IllegalArgumentException();
@@ -668,21 +724,28 @@ public static int toChars(int codePoint, char[] dst, int dstIndex) {
return 1;
}
- /**
- *
- * Converts the Unicode code point, codePoint, into a UTF-16
- * encoded sequence that is returned as a char[].
- *
- *
- * @param codePoint The Unicode code point to encode.
- * @return The UTF-16 encoded char sequence; if code point is
- * a {@link #isSupplementaryCodePoint(int) supplementary code point},
- * then a 2 char array is returned, otherwise a 1
- * char array is returned.
- * @throws IllegalArgumentException if codePoint is not a
- * valid Unicode code point.
- * @since 1.5
- */
+ /// Converts the Unicode code point, `codePoint`, into a UTF-16
+ /// encoded sequence that is returned as a `char[]`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `codePoint`: The Unicode code point to encode.
+ ///
+ /// #### Returns
+ ///
+ /// @return The UTF-16 encoded `char` sequence; if code point is
+ /// a `supplementary code point`,
+ /// then a 2 `char` array is returned, otherwise a 1
+ /// `char` array is returned.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException if `codePoint` is not a
+ /// valid Unicode code point.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static char[] toChars(int codePoint) {
if (!isValidCodePoint(codePoint)) {
throw new IllegalArgumentException();
@@ -697,24 +760,34 @@ public static char[] toChars(int codePoint) {
return new char[] { (char) codePoint };
}
- /**
- *
- * Counts the number of Unicode code points in the subsequence of the
- * CharSequence, as delineated by the
- * beginIndex and endIndex. Any surrogate
- * values with missing pair values will be counted as 1 code point.
- *
- *
- * @param seq The CharSequence to look through.
- * @param beginIndex The inclusive index to begin counting at.
- * @param endIndex The exclusive index to stop counting at.
- * @return The number of Unicode code points.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if beginIndex is
- * negative, greater than seq.length() or greater
- * than endIndex.
- * @since 1.5
- */
+ /// Counts the number of Unicode code points in the subsequence of the
+ /// `CharSequence`, as delineated by the
+ /// `beginIndex` and `endIndex`. Any surrogate
+ /// values with missing pair values will be counted as 1 code point.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `CharSequence` to look through.
+ ///
+ /// - `beginIndex`: The inclusive index to begin counting at.
+ ///
+ /// - `endIndex`: The exclusive index to stop counting at.
+ ///
+ /// #### Returns
+ ///
+ /// The number of Unicode code points.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `beginIndex` is
+ /// negative, greater than `seq.length()` or greater
+ /// than `endIndex`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointCount(CharSequence seq, int beginIndex,
int endIndex) {
if (seq == null) {
@@ -741,25 +814,35 @@ public static int codePointCount(CharSequence seq, int beginIndex,
return result;
}
- /**
- *
- * Counts the number of Unicode code points in the subsequence of the
- * char[], as delineated by the offset and
- * count. Any surrogate values with missing pair values will
- * be counted as 1 code point.
- *
- *
- * @param seq The char[] to look through.
- * @param offset The inclusive index to begin counting at.
- * @param count The number of char values to look through in
- * seq.
- * @return The number of Unicode code points.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if offset or
- * count is negative or if endIndex is
- * greater than seq.length.
- * @since 1.5
- */
+ /// Counts the number of Unicode code points in the subsequence of the
+ /// `char[]`, as delineated by the `offset` and
+ /// `count`. Any surrogate values with missing pair values will
+ /// be counted as 1 code point.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `char[]` to look through.
+ ///
+ /// - `offset`: The inclusive index to begin counting at.
+ ///
+ /// - `count`: @param count The number of `char` values to look through in
+ /// `seq`.
+ ///
+ /// #### Returns
+ ///
+ /// The number of Unicode code points.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `offset` or
+ /// `count` is negative or if `endIndex` is
+ /// greater than `seq.length`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int codePointCount(char[] seq, int offset, int count) {
if (seq == null) {
throw new NullPointerException();
@@ -786,28 +869,38 @@ public static int codePointCount(char[] seq, int offset, int count) {
return result;
}
- /**
- *
- * Determines the index into the CharSequence that is offset
- * (measured in code points and specified by codePointOffset),
- * from the index argument.
- *
- *
- * @param seq The CharSequence to find the index within.
- * @param index The index to begin from, within the
- * CharSequence.
- * @param codePointOffset The number of code points to look back or
- * forwards; may be a negative or positive value.
- * @return The calculated index that is codePointOffset code
- * points from index.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if index is negative,
- * greater than seq.length(), there aren't enough
- * values in seq after index or before
- * index if codePointOffset is
- * negative.
- * @since 1.5
- */
+ /// Determines the index into the `CharSequence` that is offset
+ /// (measured in code points and specified by `codePointOffset`),
+ /// from the `index` argument.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `CharSequence` to find the index within.
+ ///
+ /// - `index`: @param index The index to begin from, within the
+ /// `CharSequence`.
+ ///
+ /// - `codePointOffset`: @param codePointOffset The number of code points to look back or
+ /// forwards; may be a negative or positive value.
+ ///
+ /// #### Returns
+ ///
+ /// @return The calculated index that is `codePointOffset` code
+ /// points from `index`.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `index` is negative,
+ /// greater than `seq.length()`, there aren't enough
+ /// values in `seq` after `index` or before
+ /// `index` if `codePointOffset` is
+ /// negative.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int offsetByCodePoints(CharSequence seq, int index,
int codePointOffset) {
if (seq == null) {
@@ -859,36 +952,47 @@ public static int offsetByCodePoints(CharSequence seq, int index,
return i;
}
- /**
- *
- * Determines the index into the char[] that is offset
- * (measured in code points and specified by codePointOffset),
- * from the index argument and is within the subsequence as
- * delineated by start and count.
- *
- *
- * @param seq The char[] to find the index within.
- *
- * @param index The index to begin from, within the char[].
- * @param codePointOffset The number of code points to look back or
- * forwards; may be a negative or positive value.
- * @param start The inclusive index that marks the beginning of the
- * subsequence.
- * @param count The number of char values to include within
- * the subsequence.
- * @return The calculated index that is codePointOffset code
- * points from index.
- * @throws NullPointerException if seq is null.
- * @throws IndexOutOfBoundsException if start or
- * count is negative, start + count
- * greater than seq.length, index is
- * less than start, index is greater
- * than start + count or there aren't enough values
- * in seq after index or before
- * index if codePointOffset is
- * negative.
- * @since 1.5
- */
+ /// Determines the index into the `char[]` that is offset
+ /// (measured in code points and specified by `codePointOffset`),
+ /// from the `index` argument and is within the subsequence as
+ /// delineated by `start` and `count`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The `char[]` to find the index within.
+ ///
+ /// - `index`: The index to begin from, within the `char[]`.
+ ///
+ /// - `codePointOffset`: @param codePointOffset The number of code points to look back or
+ /// forwards; may be a negative or positive value.
+ ///
+ /// - `start`: @param start The inclusive index that marks the beginning of the
+ /// subsequence.
+ ///
+ /// - `count`: @param count The number of `char` values to include within
+ /// the subsequence.
+ ///
+ /// #### Returns
+ ///
+ /// @return The calculated index that is `codePointOffset` code
+ /// points from `index`.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `seq` is `null`.
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException if `start` or
+ /// `count` is negative, `start + count`
+ /// greater than `seq.length`, `index` is
+ /// less than `start`, `index` is greater
+ /// than `start + count` or there aren't enough values
+ /// in `seq` after `index` or before
+ /// `index` if `codePointOffset` is
+ /// negative.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int offsetByCodePoints(char[] seq, int start, int count,
int index, int codePointOffset) {
if (seq == null) {
@@ -941,29 +1045,34 @@ public static int offsetByCodePoints(char[] seq, int start, int count,
return i;
}
- /**
- * Reverse the order of the first and second bytes in character
- * @param c
- * the character
- * @return the character with reordered bytes.
- */
+ /// Reverse the order of the first and second bytes in character
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: the character
+ ///
+ /// #### Returns
+ ///
+ /// the character with reordered bytes.
public static char reverseBytes(char c) {
return (char)((c<<8) | (c>>8));
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Character valueOf(char i) {
return null;
}
- /**
- * See {@link #isWhitespace(int)}.
- */
+ /// See `#isWhitespace(int)`.
public static boolean isWhitespace(char c) {
return isWhitespace((int) c);
}
@@ -988,13 +1097,11 @@ public static boolean isSpaceChar(char ch) {
- /**
- * Returns true if the given code point is a Unicode whitespace character.
- * The exact set of characters considered as whitespace varies with Unicode version.
- * Note that non-breaking spaces are not considered whitespace.
- * Note also that line separators are considered whitespace; see {@link #isSpaceChar}
- * for an alternative.
- */
+ /// Returns true if the given code point is a Unicode whitespace character.
+ /// The exact set of characters considered as whitespace varies with Unicode version.
+ /// Note that non-breaking spaces are not considered whitespace.
+ /// Note also that line separators are considered whitespace; see `#isSpaceChar`
+ /// for an alternative.
public static boolean isWhitespace(int codePoint) {
// We don't just call into icu4c because of the JNI overhead. Ideally we'd fix that.
// Any ASCII whitespace character?
diff --git a/Ports/CLDC11/src/java/lang/Class.java b/Ports/CLDC11/src/java/lang/Class.java
index 2e640a47ab..ae8200a31c 100644
--- a/Ports/CLDC11/src/java/lang/Class.java
+++ b/Ports/CLDC11/src/java/lang/Class.java
@@ -26,91 +26,77 @@
import java.lang.annotation.*;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
-/**
- * Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions.
- * Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded.
- * The following example uses a Class object to print the class name of an object:
- * Since: JDK1.0, CLDC 1.0
- */
+/// Instances of the class Class represent classes and interfaces in a running Java application. Every array also belongs to a class that is reflected as a Class object that is shared by all arrays with the same element type and number of dimensions.
+/// Class has no public constructor. Instead Class objects are constructed automatically by the Java Virtual Machine as classes are loaded.
+/// The following example uses a Class object to print the class name of an object:
+/// Since: JDK1.0, CLDC 1.0
public final class Class implements java.lang.reflect.Type {
public ClassLoader getClassLoader() {
return ClassLoader.getSystemClassLoader();
}
- /**
- * Returns the Class object associated with the class with the given string name. Given the fully-qualified name for a class or interface, this method attempts to locate, load and link the class.
- * For example, the following code fragment returns the runtime Class descriptor for the class named java.lang.Thread: Classt= Class.forName("java.lang.Thread")
- * @deprecated don't use this method for anything important since class names are obfuscated on the device!
- */
+ /// Returns the Class object associated with the class with the given string name. Given the fully-qualified name for a class or interface, this method attempts to locate, load and link the class.
+ /// For example, the following code fragment returns the runtime Class descriptor for the class named java.lang.Thread: Classt= Class.forName("java.lang.Thread")
+ ///
+ /// #### Deprecated
+ ///
+ /// don't use this method for anything important since class names are obfuscated on the device!
public static java.lang.Class forName(java.lang.String className) throws java.lang.ClassNotFoundException{
return null; //TODO codavaj!!
}
- /**
- * Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.
- * If this Class object represents a class of arrays, then the internal form of the name consists of the name of the element type in Java signature format, preceded by one or more "[" characters representing the depth of array nesting. Thus:
- * (new Object[3]).getClass().getName() returns "[Ljava.lang.Object;" and: (new int[3][4][5][6][7][8][9]).getClass().getName() returns "[[[[[[[I". The encoding of element type names is as follows: B byte C char D double F float I int J long L
- * class or interface S short Z boolean The class or interface name
- * is given in fully qualified form as shown in the example above.
- * @deprecated don't use this method for anything important since class names are obfuscated on the device!
- */
+ /// Returns the fully-qualified name of the entity (class, interface, array class, primitive type, or void) represented by this Class object, as a String.
+ /// If this Class object represents a class of arrays, then the internal form of the name consists of the name of the element type in Java signature format, preceded by one or more "[" characters representing the depth of array nesting. Thus:
+ /// (new Object[3]).getClass().getName() returns "[Ljava.lang.Object;" and: (new int[3][4][5][6][7][8][9]).getClass().getName() returns "[[[[[[[I". The encoding of element type names is as follows: B byte C char D double F float I int J long L
+ /// class or interface S short Z boolean The class or interface name
+ /// is given in fully qualified form as shown in the example above.
+ ///
+ /// #### Deprecated
+ ///
+ /// don't use this method for anything important since class names are obfuscated on the device!
public java.lang.String getName(){
return null; //TODO codavaj!!
}
- /**
- * Finds a resource with a given name in the application's JAR file. This method returns null if no resource with this name is found in the application's JAR file.
- * The resource names can be represented in two different formats: absolute or relative.
- * Absolute format: /packagePathName/resourceName
- * Relative format: resourceName
- * In the absolute format, the programmer provides a fully qualified name that includes both the full path and the name of the resource inside the JAR file. In the path names, the character "/" is used as the separator.
- * In the relative format, the programmer provides only the name of the actual resource. Relative names are converted to absolute names by the system by prepending the resource name with the fully qualified package name of class upon which the getResourceAsStream method was called.
- */
+ /// Finds a resource with a given name in the application's JAR file. This method returns null if no resource with this name is found in the application's JAR file.
+ /// The resource names can be represented in two different formats: absolute or relative.
+ /// Absolute format: /packagePathName/resourceName
+ /// Relative format: resourceName
+ /// In the absolute format, the programmer provides a fully qualified name that includes both the full path and the name of the resource inside the JAR file. In the path names, the character "/" is used as the separator.
+ /// In the relative format, the programmer provides only the name of the actual resource. Relative names are converted to absolute names by the system by prepending the resource name with the fully qualified package name of class upon which the getResourceAsStream method was called.
public java.io.InputStream getResourceAsStream(java.lang.String name){
return null; //TODO codavaj!!
}
- /**
- * Determines if this Class object represents an array class.
- */
+ /// Determines if this Class object represents an array class.
public boolean isArray(){
return false; //TODO codavaj!!
}
- /**
- * Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter. It returns true if so; otherwise it returns false. If this Class object represents a primitive type, this method returns true if the specified Class parameter is exactly this Class object; otherwise it returns false.
- * Specifically, this method tests whether the type represented by the specified Class parameter can be converted to the type represented by this Class object via an identity conversion or via a widening reference conversion. See The Java Language Specification, sections 5.1.1 and 5.1.4 , for details.
- */
+ /// Determines if the class or interface represented by this Class object is either the same as, or is a superclass or superinterface of, the class or interface represented by the specified Class parameter. It returns true if so; otherwise it returns false. If this Class object represents a primitive type, this method returns true if the specified Class parameter is exactly this Class object; otherwise it returns false.
+ /// Specifically, this method tests whether the type represented by the specified Class parameter can be converted to the type represented by this Class object via an identity conversion or via a widening reference conversion. See The Java Language Specification, sections 5.1.1 and 5.1.4 , for details.
public boolean isAssignableFrom(java.lang.Class cls){
return false; //TODO codavaj!!
}
- /**
- * Determines if the specified Object is assignment-compatible with the object represented by this Class. This method is the dynamic equivalent of the Java language instanceof operator. The method returns true if the specified Object argument is non-null and can be cast to the reference type represented by this Class object without raising a ClassCastException. It returns false otherwise.
- * Specifically, if this Class object represents a declared class, this method returns true if the specified Object argument is an instance of the represented class (or of any of its subclasses); it returns false otherwise. If this Class object represents an array class, this method returns true if the specified Object argument can be converted to an object of the array class by an identity conversion or by a widening reference conversion; it returns false otherwise. If this Class object represents an interface, this method returns true if the class or any superclass of the specified Object argument implements this interface; it returns false otherwise. If this Class object represents a primitive type, this method returns false.
- */
+ /// Determines if the specified Object is assignment-compatible with the object represented by this Class. This method is the dynamic equivalent of the Java language instanceof operator. The method returns true if the specified Object argument is non-null and can be cast to the reference type represented by this Class object without raising a ClassCastException. It returns false otherwise.
+ /// Specifically, if this Class object represents a declared class, this method returns true if the specified Object argument is an instance of the represented class (or of any of its subclasses); it returns false otherwise. If this Class object represents an array class, this method returns true if the specified Object argument can be converted to an object of the array class by an identity conversion or by a widening reference conversion; it returns false otherwise. If this Class object represents an interface, this method returns true if the class or any superclass of the specified Object argument implements this interface; it returns false otherwise. If this Class object represents a primitive type, this method returns false.
public boolean isInstance(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Determines if the specified Class object represents an interface type.
- */
+ /// Determines if the specified Class object represents an interface type.
public boolean isInterface(){
return false; //TODO codavaj!!
}
- /**
- * Creates a new instance of a class.
- */
+ /// Creates a new instance of a class.
public java.lang.Object newInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException{
return null; //TODO codavaj!!
}
- /**
- * Converts the object to a string. The string representation is the string "class" or "interface", followed by a space, and then by the fully qualified name of the class in the format returned by getName. If this Class object represents a primitive type, this method returns the name of the primitive type. If this Class object represents void this method returns "void".
- */
+ /// Converts the object to a string. The string representation is the string "class" or "interface", followed by a space, and then by the fully qualified name of the class in the format returned by getName. If this Class object represents a primitive type, this method returns the name of the primitive type. If this Class object represents void this method returns "void".
public java.lang.String toString(){
return null; //TODO codavaj!!
}
@@ -121,10 +107,7 @@ public boolean isAnnotation() {
return false;
}
- /**
- * Returns this element's annotation for the specified type if such an annotation is present, else null.
- *
- */
+ /// Returns this element's annotation for the specified type if such an annotation is present, else null.
public T getAnnotation( Class annotationType ) {
if ( annotationType == null ) {
throw new NullPointerException( "Null annotationType" );
@@ -133,148 +116,143 @@ public T getAnnotation( Class annotationType ) {
return null;//AIB.getAib(c).getClassAnnotation(annotationType);
}
- /**
- * Returns all annotations present on this element.
- */
+ /// Returns all annotations present on this element.
public Annotation[] getAnnotations() {
return null;//AIB.getAib(c).getClassAnnotations();
}
- /**
- * Returns all annotations that are directly present on this element.
- */
+ /// Returns all annotations that are directly present on this element.
public Annotation[] getDeclaredAnnotations() {
return null;//AIB.getAib(c).getDeclaredClassAnnotations();
}
- /**
- * Returns true if an annotation for the specified type is present on this element, else false.
- */
+ /// Returns true if an annotation for the specified type is present on this element, else false.
public boolean isAnnotationPresent( Class annotationType ) {
return false;
}
- /**
- * Replacement for Class.asSubclass(Class).
- *
- * @param c a Class
- * @param superclass another Class which must be a superclass of c
- * @return c
- * @throws java.lang.ClassCastException if c is
- */
+ /// Replacement for Class.asSubclass(Class).
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: a Class
+ ///
+ /// - `superclass`: another Class which must be a superclass of *c*
+ ///
+ /// #### Returns
+ ///
+ /// *c*
+ ///
+ /// #### Throws
+ ///
+ /// - `java.lang.ClassCastException`: if *c* is
public Class asSubclass(Class superclass) {
return null;
}
- /**
- * Replacement for Class.cast(Object). Throws a ClassCastException if obj
- * is not an instance of class c, or a subtype of c.
- *
- * @param c Class we want to cast obj to
- * @param object object we want to cast
- * @return The object, or null if the object is
- * null.
- * @throws java.lang.ClassCastException if obj is not
- * null or an instance of c
- */
+ /// Replacement for Class.cast(Object). Throws a ClassCastException if *obj*
+ /// is not an instance of class c, or a subtype of c.
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: Class we want to cast obj to
+ ///
+ /// - `object`: object we want to cast
+ ///
+ /// #### Returns
+ ///
+ /// @return The object, or `null` if the object is
+ /// `null`.
+ ///
+ /// #### Throws
+ ///
+ /// - `java.lang.ClassCastException`: @throws java.lang.ClassCastException if obj is not
+ /// `null` or an instance of c
public Object cast(Object object) {
return null;
}
- /**
- * Replacement for Class.isEnum().
- *
- * @param class_ class we want to test.
- * @return true if the class was declared as an Enum.
- */
+ /// Replacement for Class.isEnum().
+ ///
+ /// #### Parameters
+ ///
+ /// - `class_`: class we want to test.
+ ///
+ /// #### Returns
+ ///
+ /// true if the class was declared as an Enum.
public boolean isEnum() {
return false;
}
- /**
- * replacement for Class.isAnonymousClass()
- */
+ /// replacement for Class.isAnonymousClass()
public boolean isAnonymousClass() {
return false;
}
- /**
- * @deprecated don't use this method for anything important since class names are obfuscated on the device!
- */
+ /// #### Deprecated
+ ///
+ /// don't use this method for anything important since class names are obfuscated on the device!
public String getSimpleName() {
return null;
}
- /**
- * replacement for Class.isSynthetic()
- */
+ /// replacement for Class.isSynthetic()
public boolean isSynthetic() {
return false;
}
- /**
- * @deprecated don't use this method for anything important since class names are obfuscated on the device!
- */
+ /// #### Deprecated
+ ///
+ /// don't use this method for anything important since class names are obfuscated on the device!
public String getCanonicalName() {
return null;
}
- /**
- * Gets for Array classes, this returns the type of the elements of the array.
- * @return
- */
+ /// Gets for Array classes, this returns the type of the elements of the array.
public Class getComponentType() {
return null;
}
- /**
- * @deprecated Not supported
- * @return
- */
+ /// #### Deprecated
+ ///
+ /// Not supported
public boolean desiredAssertionStatus() {
return false;
}
- /**
- * @deprecated Not supported
- * @return
- */
+ /// #### Deprecated
+ ///
+ /// Not supported
public java.lang.reflect.Type[] getGenericInterfaces() {
throw new UnsupportedOperationException("Class.getGenericInterfaces() not supported on this platform");
}
- /**
- * Returns true if this class is a primitive type.
- * @return
- */
+ /// Returns true if this class is a primitive type.
public boolean isPrimitive() {
return false;
}
- /**
- *
- * @return
- * @deprecated Not supported
- */
+ /// #### Deprecated
+ ///
+ /// Not supported
public Method getEnclosingMethod() {
return null;
}
- /**
- * Returns null always. Not supported in CN1.
- * @return
- * @deprecated Not supported
- */
+ /// Returns null always. Not supported in CN1.
+ ///
+ /// #### Deprecated
+ ///
+ /// Not supported
public Constructor getEnclosingConstructor() {
return null;
}
- /**
- *
- * @return
- * @deprecated Not supported
- */
+ /// #### Deprecated
+ ///
+ /// Not supported
public boolean isLocalClass() {
return false;
}
diff --git a/Ports/CLDC11/src/java/lang/ClassCastException.java b/Ports/CLDC11/src/java/lang/ClassCastException.java
index e7a9ddcfc2..9bbcf10634 100644
--- a/Ports/CLDC11/src/java/lang/ClassCastException.java
+++ b/Ports/CLDC11/src/java/lang/ClassCastException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that the code has attempted to cast an object to a subclass of which it is not an instance. For example, the following code generates a ClassCastException:
+/// Since: JDK1.0, CLDC 1.0
public class ClassCastException extends java.lang.RuntimeException{
- /**
- * Constructs a ClassCastException with no detail message.
- */
+ /// Constructs a ClassCastException with no detail message.
public ClassCastException(){
//TODO codavaj!!
}
- /**
- * Constructs a ClassCastException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a ClassCastException with the specified detail message.
+ /// s - the detail message.
public ClassCastException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/ClassNotFoundException.java b/Ports/CLDC11/src/java/lang/ClassNotFoundException.java
index 85a6bd655b..567da68488 100644
--- a/Ports/CLDC11/src/java/lang/ClassNotFoundException.java
+++ b/Ports/CLDC11/src/java/lang/ClassNotFoundException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when an application tries to load in a class through its string name using the forName method in class Class but no definition for the class with the specified name could be found.
- * Since: JDK1.0, CLDC 1.0 See Also:Class.forName(java.lang.String)
- */
+/// Thrown when an application tries to load in a class through its string name using the forName method in class Class but no definition for the class with the specified name could be found.
+/// Since: JDK1.0, CLDC 1.0 See Also:Class.forName(java.lang.String)
public class ClassNotFoundException extends java.lang.Exception{
- /**
- * Constructs a ClassNotFoundException with no detail message.
- */
+ /// Constructs a ClassNotFoundException with no detail message.
public ClassNotFoundException(){
//TODO codavaj!!
}
- /**
- * Constructs a ClassNotFoundException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a ClassNotFoundException with the specified detail message.
+ /// s - the detail message.
public ClassNotFoundException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/CloneNotSupportedException.java b/Ports/CLDC11/src/java/lang/CloneNotSupportedException.java
index 642d014f34..4094d95920 100644
--- a/Ports/CLDC11/src/java/lang/CloneNotSupportedException.java
+++ b/Ports/CLDC11/src/java/lang/CloneNotSupportedException.java
@@ -17,31 +17,28 @@
package java.lang;
-/**
- * Thrown when a program attempts to clone an object which does not support the
- * {@link Cloneable} interface.
- *
- * @see Cloneable
- */
+/// Thrown when a program attempts to clone an object which does not support the
+/// `Cloneable` interface.
+///
+/// #### See also
+///
+/// - Cloneable
public class CloneNotSupportedException extends Exception {
private static final long serialVersionUID = 5195511250079656443L;
- /**
- * Constructs a new {@code CloneNotSupportedException} that includes the
- * current stack trace.
- */
+ /// Constructs a new `CloneNotSupportedException` that includes the
+ /// current stack trace.
public CloneNotSupportedException() {
super();
}
- /**
- * Constructs a new {@code CloneNotSupportedException} with the current
- * stack trace and the specified detail message.
- *
- * @param detailMessage
- * the detail message for this exception.
- */
+ /// Constructs a new `CloneNotSupportedException` with the current
+ /// stack trace and the specified detail message.
+ ///
+ /// #### Parameters
+ ///
+ /// - `detailMessage`: the detail message for this exception.
public CloneNotSupportedException(String detailMessage) {
super(detailMessage);
}
diff --git a/Ports/CLDC11/src/java/lang/Cloneable.java b/Ports/CLDC11/src/java/lang/Cloneable.java
index 91e1c8f30a..2df0f7c432 100644
--- a/Ports/CLDC11/src/java/lang/Cloneable.java
+++ b/Ports/CLDC11/src/java/lang/Cloneable.java
@@ -18,16 +18,20 @@
package java.lang;
-/**
- * This (empty) interface must be implemented by all classes that wish to
- * support cloning. The implementation of {@code clone()} in {@code Object}
- * checks if the object being cloned implements this interface and throws
- * {@code CloneNotSupportedException} if it does not.
- *
- * @see Object#clone
- * @see CloneNotSupportedException
- * @deprecated clone isn't supported in Codename One, this interface is here strictly for compilation purposes
- */
+/// This (empty) interface must be implemented by all classes that wish to
+/// support cloning. The implementation of `clone()` in `Object`
+/// checks if the object being cloned implements this interface and throws
+/// `CloneNotSupportedException` if it does not.
+///
+/// #### Deprecated
+///
+/// clone isn't supported in Codename One, this interface is here strictly for compilation purposes
+///
+/// #### See also
+///
+/// - Object#clone
+///
+/// - CloneNotSupportedException
public interface Cloneable {
// Marker interface
}
diff --git a/Ports/CLDC11/src/java/lang/Comparable.java b/Ports/CLDC11/src/java/lang/Comparable.java
index 129685b67c..a91fa840d6 100644
--- a/Ports/CLDC11/src/java/lang/Comparable.java
+++ b/Ports/CLDC11/src/java/lang/Comparable.java
@@ -17,37 +17,40 @@
package java.lang;
-/**
- * This interface should be implemented by all classes that wish to define a
- * natural order of their instances.
- * {@link java.util.Collections#sort} and {@code java.util.Arrays#sort} can then
- * be used to automatically sort lists of classes that implement this interface.
- *
- * The order rule must be both transitive (if {@code x.compareTo(y) < 0} and
- * {@code y.compareTo(z) < 0}, then {@code x.compareTo(z) < 0} must hold) and
- * invertible (the sign of the result of x.compareTo(y) must be equal to the
- * negation of the sign of the result of y.compareTo(x) for all combinations of
- * x and y).
- *
- * In addition, it is recommended (but not required) that if and only if the
- * result of x.compareTo(y) is zero, then the result of x.equals(y) should be
- * {@code true}.
- */
+/// This interface should be implemented by all classes that wish to define a
+/// *natural order* of their instances.
+/// `java.util.Collections#sort` and `java.util.Arrays#sort` can then
+/// be used to automatically sort lists of classes that implement this interface.
+///
+/// The order rule must be both transitive (if `x.compareTo(y) < 0` and
+/// `y.compareTo(z) < 0`, then `x.compareTo(z) < 0` must hold) and
+/// invertible (the sign of the result of x.compareTo(y) must be equal to the
+/// negation of the sign of the result of y.compareTo(x) for all combinations of
+/// x and y).
+///
+/// In addition, it is recommended (but not required) that if and only if the
+/// result of x.compareTo(y) is zero, then the result of x.equals(y) should be
+/// `true`.
public interface Comparable {
- /**
- * Compares this object to the specified object to determine their relative
- * order.
- *
- * @param another
- * the object to compare to this instance.
- * @return a negative integer if this instance is less than {@code another};
- * a positive integer if this instance is greater than
- * {@code another}; 0 if this instance has the same order as
- * {@code another}.
- * @throws ClassCastException
- * if {@code another} cannot be converted into something
- * comparable to {@code this} instance.
- */
+ /// Compares this object to the specified object to determine their relative
+ /// order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `another`: the object to compare to this instance.
+ ///
+ /// #### Returns
+ ///
+ /// @return a negative integer if this instance is less than `another`;
+ /// a positive integer if this instance is greater than
+ /// `another`; 0 if this instance has the same order as
+ /// `another`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if `another` cannot be converted into something
+ /// comparable to `this` instance.
int compareTo(T another);
}
diff --git a/Ports/CLDC11/src/java/lang/Deprecated.java b/Ports/CLDC11/src/java/lang/Deprecated.java
index e4cc651e35..ee0b351696 100644
--- a/Ports/CLDC11/src/java/lang/Deprecated.java
+++ b/Ports/CLDC11/src/java/lang/Deprecated.java
@@ -20,13 +20,11 @@
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Documented;
-/**
- *
- * An annotation for marking an element as deprecated.
- *
- *
- * @since 1.5
- */
+/// An annotation for marking an element as deprecated.
+///
+/// #### Since
+///
+/// 1.5
@Documented
@Retention(RetentionPolicy.RUNTIME)
public @interface Deprecated {
diff --git a/Ports/CLDC11/src/java/lang/Double.java b/Ports/CLDC11/src/java/lang/Double.java
index c9d593aaba..cf09546371 100644
--- a/Ports/CLDC11/src/java/lang/Double.java
+++ b/Ports/CLDC11/src/java/lang/Double.java
@@ -22,225 +22,179 @@
* have any questions.
*/
package java.lang;
-/**
- * The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.
- * In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.
- * Since: JDK1.0, CLDC 1.1
- */
+/// The Double class wraps a value of the primitive type double in an object. An object of type Double contains a single field whose type is double.
+/// In addition, this class provides several methods for converting a double to a String and a String to a double, as well as other constants and methods useful when dealing with a double.
+/// Since: JDK1.0, CLDC 1.1
public final class Double extends Number implements Comparable {
public static final Class TYPE = double.class;
- /**
- * The largest positive finite value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7fefffffffffffffL)
- * See Also:Constant Field Values
- */
+ /// The largest positive finite value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7fefffffffffffffL)
+ /// See Also:Constant Field Values
public static final double MAX_VALUE=1.7976931348623157E308d;
- /**
- * The smallest positive value of type double. It is equal to the value returned by Double.longBitsToDouble(0x1L).
- */
+ /// The smallest positive value of type double. It is equal to the value returned by Double.longBitsToDouble(0x1L).
public static final double MIN_VALUE=0.0d;
- /**
- * A Not-a-Number (NaN) value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff8000000000000L).
- * See Also:Constant Field Values
- */
+ /// A Not-a-Number (NaN) value of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff8000000000000L).
+ /// See Also:Constant Field Values
public static final double NaN=0d/0d;
- /**
- * The negative infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0xfff0000000000000L).
- * See Also:Constant Field Values
- */
+ /// The negative infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0xfff0000000000000L).
+ /// See Also:Constant Field Values
public static final double NEGATIVE_INFINITY=-1d/0d;
- /**
- * The positive infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff0000000000000L).
- * See Also:Constant Field Values
- */
+ /// The positive infinity of type double. It is equal to the value returned by Double.longBitsToDouble(0x7ff0000000000000L).
+ /// See Also:Constant Field Values
public static final double POSITIVE_INFINITY=1d/0d;
- /**
- * Constructs a newly allocated Double object that represents the primitive double argument.
- * value - the value to be represented by the Double.
- */
+ /// Constructs a newly allocated Double object that represents the primitive double argument.
+ /// value - the value to be represented by the Double.
public Double(double value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Double as a byte (by casting to a byte).
- */
+ /// Returns the value of this Double as a byte (by casting to a byte).
public byte byteValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
- * Bit 63 (the bit that is selected by the mask 0x8000000000000000L) represents the sign of the floating-point number. Bits 62-52 (the bits that are selected by the mask 0x7ff0000000000000L) represent the exponent. Bits 51-0 (the bits that are selected by the mask 0x000fffffffffffffL) represent the significand (sometimes called the mantissa) of the floating-point number.
- * If the argument is positive infinity, the result is 0x7ff0000000000000L.
- * If the argument is negative infinity, the result is 0xfff0000000000000L.
- * If the argument is NaN, the result is 0x7ff8000000000000L.
- * In all cases, the result is a long integer that, when given to the longBitsToDouble(long) method, will produce a floating-point value equal to the argument to doubleToLongBits.
- */
+ /// Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.
+ /// Bit 63 (the bit that is selected by the mask 0x8000000000000000L) represents the sign of the floating-point number. Bits 62-52 (the bits that are selected by the mask 0x7ff0000000000000L) represent the exponent. Bits 51-0 (the bits that are selected by the mask 0x000fffffffffffffL) represent the significand (sometimes called the mantissa) of the floating-point number.
+ /// If the argument is positive infinity, the result is 0x7ff0000000000000L.
+ /// If the argument is negative infinity, the result is 0xfff0000000000000L.
+ /// If the argument is NaN, the result is 0x7ff8000000000000L.
+ /// In all cases, the result is a long integer that, when given to the longBitsToDouble(long) method, will produce a floating-point value equal to the argument to doubleToLongBits.
public static long doubleToLongBits(double value){
return 0l; //TODO codavaj!!
}
- /**
- * Returns the double value of this Double.
- */
+ /// Returns the double value of this Double.
public double doubleValue(){
return 0.0d; //TODO codavaj!!
}
- /**
- * Compares this object against the specified object. The result is true if and only if the argument is not null and is a Double object that represents a double that has the identical bit pattern to the bit pattern of the double represented by this object. For this purpose, two double values are considered to be the same if and only if the method
- * returns the same long value when applied to each.
- * Note that in most cases, for two instances of class Double, d1 and d2, the value of d1.equals(d2) is true if and only if
- * d1.doubleValue()
- * == d2.doubleValue()
- * also has the value true. However, there are two exceptions: If d1 and d2 both represent Double.NaN, then the equals method returns true, even though Double.NaN==Double.NaN has the value false. If d1 represents +0.0 while d2 represents -0.0, or vice versa, the equals test has the value false, even though +0.0==-0.0 has the value true. This allows hashtables to operate properly.
- */
+ /// Compares this object against the specified object. The result is true if and only if the argument is not null and is a Double object that represents a double that has the identical bit pattern to the bit pattern of the double represented by this object. For this purpose, two double values are considered to be the same if and only if the method
+ /// returns the same long value when applied to each.
+ /// Note that in most cases, for two instances of class Double, d1 and d2, the value of d1.equals(d2) is true if and only if
+ /// d1.doubleValue()
+ /// == d2.doubleValue()
+ /// also has the value true. However, there are two exceptions: If d1 and d2 both represent Double.NaN, then the equals method returns true, even though Double.NaN==Double.NaN has the value false. If d1 represents +0.0 while d2 represents -0.0, or vice versa, the equals test has the value false, even though +0.0==-0.0 has the value true. This allows hashtables to operate properly.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns the float value of this Double.
- */
+ /// Returns the float value of this Double.
public float floatValue(){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this Double object. The result is the exclusive OR of the two halves of the long integer bit representation, exactly as produced by the method
- * , of the primitive double value represented by this Double object. That is, the hashcode is the value of the expression: (int)(v^(v>>>32)) where v is defined by: long v = Double.doubleToLongBits(this.doubleValue());
- */
+ /// Returns a hashcode for this Double object. The result is the exclusive OR of the two halves of the long integer bit representation, exactly as produced by the method
+ /// , of the primitive double value represented by this Double object. That is, the hashcode is the value of the expression: (int)(v^(v>>>32)) where v is defined by: long v = Double.doubleToLongBits(this.doubleValue());
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the integer value of this Double (by casting to an int).
- */
+ /// Returns the integer value of this Double (by casting to an int).
public int intValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns true if this Double value is infinitely large in magnitude.
- */
+ /// Returns true if this Double value is infinitely large in magnitude.
public boolean isInfinite(){
return false; //TODO codavaj!!
}
- /**
- * Returns true if the specified number is infinitely large in magnitude.
- */
+ /// Returns true if the specified number is infinitely large in magnitude.
public static boolean isInfinite(double v){
return false; //TODO codavaj!!
}
- /**
- * Returns true if this Double value is the special Not-a-Number (NaN) value.
- */
+ /// Returns true if this Double value is the special Not-a-Number (NaN) value.
public boolean isNaN(){
return false; //TODO codavaj!!
}
- /**
- * Returns true if the specified number is the special Not-a-Number (NaN) value.
- */
+ /// Returns true if the specified number is the special Not-a-Number (NaN) value.
public static boolean isNaN(double v){
return false; //TODO codavaj!!
}
- /**
- * Returns the double-float corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "double precision" bit layout. That floating-point value is returned as the result.
- * If the argument is 0x7ff0000000000000L, the result is positive infinity.
- * If the argument is 0xfff0000000000000L, the result is negative infinity.
- * If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result is NaN. All IEEE 754 NaN values of type double are, in effect, lumped together by the Java programming language into a single value called NaN.
- * In all other cases, let s, e, and m be three values that can be computed from the argument:
- * int s = ((bits >> 63) == 0) ? 1 : -1; int e = (int)((bits >> 52) & 0x7ffL); long m = (e == 0) ? (bits & 0xfffffffffffffL) << 1 : (bits & 0xfffffffffffffL) | 0x10000000000000L; Then the floating-point result equals the value of the mathematical expression
- * 2e-1075.
- */
+ /// Returns the double-float corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "double precision" bit layout. That floating-point value is returned as the result.
+ /// If the argument is 0x7ff0000000000000L, the result is positive infinity.
+ /// If the argument is 0xfff0000000000000L, the result is negative infinity.
+ /// If the argument is any value in the range 0x7ff0000000000001L through 0x7fffffffffffffffL or in the range 0xfff0000000000001L through 0xffffffffffffffffL, the result is NaN. All IEEE 754 NaN values of type double are, in effect, lumped together by the Java programming language into a single value called NaN.
+ /// In all other cases, let s, e, and m be three values that can be computed from the argument:
+ /// int s = ((bits >> 63) == 0) ? 1 : -1; int e = (int)((bits >> 52) & 0x7ffL); long m = (e == 0) ? (bits & 0xfffffffffffffL) << 1 : (bits & 0xfffffffffffffL) | 0x10000000000000L; Then the floating-point result equals the value of the mathematical expression
+ /// 2e-1075.
public static double longBitsToDouble(long bits){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the long value of this Double (by casting to a long).
- */
+ /// Returns the long value of this Double (by casting to a long).
public long longValue(){
return 0l; //TODO codavaj!!
}
- /**
- * Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
- */
+ /// Returns a new double initialized to the value represented by the specified String, as performed by the valueOf method of class Double.
public static double parseDouble(java.lang.String s) throws java.lang.NumberFormatException{
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the value of this Double as a short (by casting to a short).
- */
+ /// Returns the value of this Double as a short (by casting to a short).
public short shortValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a String representation of this Double object. The primitive double value represented by this object is converted to a string exactly as if by the method toString of one argument.
- */
+ /// Returns a String representation of this Double object. The primitive double value represented by this object is converted to a string exactly as if by the method toString of one argument.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Creates a string representation of the double argument. All characters mentioned below are ASCII characters. If the argument is NaN, the result is the string "NaN". Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude
- * : If
- * is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity". If
- * is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0". If
- * is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of
- * , in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of
- * . If
- * is less than 10-3 or not less than 107, then it is represented in so-called "computerized scientific notation." Let
- * be the unique integer such that 10n
- * =
- * 10n+1; then let
- * be the mathematically exact quotient of
- * and 10n so that 1
- * =
- * 10. The magnitude is then represented as the integer part of
- * , as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of
- * , followed by the letter 'E' (E), followed by a representation of
- * as a decimal integer, as produced by the method
- * .
- * How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type double. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument d. Then d must be the double value nearest to x; or if two double values are equally close to x, then d must be one of them and the least significant bit of the significand of d must be 0.
- */
+ /// Creates a string representation of the double argument. All characters mentioned below are ASCII characters. If the argument is NaN, the result is the string "NaN". Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude
+ /// : If
+ /// is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity". If
+ /// is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0". If
+ /// is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of
+ /// , in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of
+ /// . If
+ /// is less than 10-3 or not less than 107, then it is represented in so-called "computerized scientific notation." Let
+ /// be the unique integer such that 10n
+ /// =
+ /// 10n+1; then let
+ /// be the mathematically exact quotient of
+ /// and 10n so that 1
+ /// =
+ /// 10. The magnitude is then represented as the integer part of
+ /// , as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of
+ /// , followed by the letter 'E' (E), followed by a representation of
+ /// as a decimal integer, as produced by the method
+ /// .
+ /// How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type double. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument d. Then d must be the double value nearest to x; or if two double values are equally close to x, then d must be one of them and the least significant bit of the significand of d must be 0.
public static java.lang.String toString(double d){
return null; //TODO codavaj!!
}
- /**
- * Returns a new Double object initialized to the value represented by the specified string. The string s is interpreted as the representation of a floating-point value and a Double object representing that value is created and returned.
- * If s is null, then a NullPointerException is thrown.
- * Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical rule:
- * where
- * and
- * are as defined in Section 3.10.2 of the
- * . If it does not have the form of a
- * , then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type double by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic. Finally, a new object of class Double is created to represent the double value.
- */
+ /// Returns a new Double object initialized to the value represented by the specified string. The string s is interpreted as the representation of a floating-point value and a Double object representing that value is created and returned.
+ /// If s is null, then a NullPointerException is thrown.
+ /// Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical rule:
+ /// where
+ /// and
+ /// are as defined in Section 3.10.2 of the
+ /// . If it does not have the form of a
+ /// , then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type double by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic. Finally, a new object of class Double is created to represent the double value.
public static java.lang.Double valueOf(java.lang.String s) throws java.lang.NumberFormatException{
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Double valueOf(double i) {
return null;
}
diff --git a/Ports/CLDC11/src/java/lang/Enum.java b/Ports/CLDC11/src/java/lang/Enum.java
index db1ba5a5fe..e1592bdb30 100644
--- a/Ports/CLDC11/src/java/lang/Enum.java
+++ b/Ports/CLDC11/src/java/lang/Enum.java
@@ -23,11 +23,9 @@
*/
package java.lang;
-/**
- * Implementation class required to compile enums
- *
- * @author Shai Almog
- */
+/// Implementation class required to compile enums
+///
+/// @author Shai Almog
public class Enum> implements Comparable {
protected Enum(final String name, final int ordinal) {
diff --git a/Ports/CLDC11/src/java/lang/Error.java b/Ports/CLDC11/src/java/lang/Error.java
index 3271673f3a..c9bcb82c89 100644
--- a/Ports/CLDC11/src/java/lang/Error.java
+++ b/Ports/CLDC11/src/java/lang/Error.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.lang;
-/**
- * An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions.
- * A method is not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method but not caught, since these errors are abnormal conditions that should never occur.
- * Since: JDK1.0, CLDC 1.0
- */
+/// An Error is a subclass of Throwable that indicates serious problems that a reasonable application should not try to catch. Most such errors are abnormal conditions.
+/// A method is not required to declare in its throws clause any subclasses of Error that might be thrown during the execution of the method but not caught, since these errors are abnormal conditions that should never occur.
+/// Since: JDK1.0, CLDC 1.0
public class Error extends java.lang.Throwable{
- /**
- * Constructs an Error with no specified detail message.
- */
+ /// Constructs an Error with no specified detail message.
public Error(){
//TODO codavaj!!
}
- /**
- * Constructs an Error with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an Error with the specified detail message.
+ /// s - the detail message.
public Error(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Exception.java b/Ports/CLDC11/src/java/lang/Exception.java
index aa8e870b6f..b7e4eb030e 100644
--- a/Ports/CLDC11/src/java/lang/Exception.java
+++ b/Ports/CLDC11/src/java/lang/Exception.java
@@ -22,39 +22,36 @@
* have any questions.
*/
package java.lang;
-/**
- * The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
- * Since: JDK1.0, CLDC 1.0 See Also:Error
- */
+/// The class Exception and its subclasses are a form of Throwable that indicates conditions that a reasonable application might want to catch.
+/// Since: JDK1.0, CLDC 1.0 See Also:Error
public class Exception extends java.lang.Throwable{
- /**
- * Constructs an Exception with no specified detail message.
- */
+ /// Constructs an Exception with no specified detail message.
public Exception(){
//TODO codavaj!!
}
- /**
- * Constructs an Exception with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an Exception with the specified detail message.
+ /// s - the detail message.
public Exception(java.lang.String s){
//TODO codavaj!!
}
- /**
- * Constructs a new exception with the provided cause.
- * @param cause The cause of the exception.
- */
+ /// Constructs a new exception with the provided cause.
+ ///
+ /// #### Parameters
+ ///
+ /// - `cause`: The cause of the exception.
public Exception(Throwable cause) {
//TODO codavaj!!
}
- /**
- * Constructs a new exception with message and cause.
- * @param s The detail message.
- * @param cause The cause of the exception
- */
+ /// Constructs a new exception with message and cause.
+ ///
+ /// #### Parameters
+ ///
+ /// - `s`: The detail message.
+ ///
+ /// - `cause`: The cause of the exception
public Exception(java.lang.String s, Throwable cause) {
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Float.java b/Ports/CLDC11/src/java/lang/Float.java
index 4ccd556284..723dcbf780 100644
--- a/Ports/CLDC11/src/java/lang/Float.java
+++ b/Ports/CLDC11/src/java/lang/Float.java
@@ -22,213 +22,165 @@
* have any questions.
*/
package java.lang;
-/**
- * The Float class wraps a value of primitive type float in an object. An object of type Float contains a single field whose type is float.
- * In addition, this class provides several methods for converting a float to a String and a String to a float, as well as other constants and methods useful when dealing with a float.
- * Since: JDK1.0, CLDC 1.1
- */
+/// The Float class wraps a value of primitive type float in an object. An object of type Float contains a single field whose type is float.
+/// In addition, this class provides several methods for converting a float to a String and a String to a float, as well as other constants and methods useful when dealing with a float.
+/// Since: JDK1.0, CLDC 1.1
public final class Float extends Number implements Comparable {
- /**
- * The largest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f7fffff).
- * See Also:Constant Field Values
- */
+ /// The largest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f7fffff).
+ /// See Also:Constant Field Values
public static final float MAX_VALUE=3.4028235E38f;
- /**
- * The smallest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x1).
- * See Also:Constant Field Values
- */
+ /// The smallest positive value of type float. It is equal to the value returned by Float.intBitsToFloat(0x1).
+ /// See Also:Constant Field Values
public static final float MIN_VALUE=1.4E-45f;
- /**
- * The Not-a-Number (NaN) value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7fc00000).
- * See Also:Constant Field Values
- */
+ /// The Not-a-Number (NaN) value of type float. It is equal to the value returned by Float.intBitsToFloat(0x7fc00000).
+ /// See Also:Constant Field Values
public static final float NaN=0f/0f;
- /**
- * The negative infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0xff800000).
- * See Also:Constant Field Values
- */
+ /// The negative infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0xff800000).
+ /// See Also:Constant Field Values
public static final float NEGATIVE_INFINITY=-1f/0f;
- /**
- * The positive infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f800000).
- * See Also:Constant Field Values
- */
+ /// The positive infinity of type float. It is equal to the value returned by Float.intBitsToFloat(0x7f800000).
+ /// See Also:Constant Field Values
public static final float POSITIVE_INFINITY=1f/0f;
- /**
- * Constructs a newly allocated Floatobject that represents the argument converted to type float.
- * value - the value to be represented by the Float.
- */
+ /// Constructs a newly allocated Floatobject that represents the argument converted to type float.
+ /// value - the value to be represented by the Float.
public Float(double value){
//TODO codavaj!!
}
- /**
- * Constructs a newly allocated Float object that represents the primitive float argument.
- * value - the value to be represented by the Float.
- */
+ /// Constructs a newly allocated Float object that represents the primitive float argument.
+ /// value - the value to be represented by the Float.
public Float(float value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Float as a byte (by casting to a byte).
- */
+ /// Returns the value of this Float as a byte (by casting to a byte).
public byte byteValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the double value of this Float object.
- */
+ /// Returns the double value of this Float object.
public double doubleValue(){
return 0.0d; //TODO codavaj!!
}
- /**
- * Compares this object against some other object. The result is true if and only if the argument is not null and is a Float object that represents a float that has the identical bit pattern to the bit pattern of the float represented by this object. For this purpose, two float values are considered to be the same if and only if the method
- * returns the same int value when applied to each.
- * Note that in most cases, for two instances of class Float, f1 and f2, the value of f1.equals(f2) is true if and only if
- * f1.floatValue() == f2.floatValue()
- * also has the value true. However, there are two exceptions: If f1 and f2 both represent Float.NaN, then the equals method returns true, even though Float.NaN==Float.NaN has the value false. If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false, even though 0.0f==-0.0f has the value true. This definition allows hashtables to operate properly.
- */
+ /// Compares this object against some other object. The result is true if and only if the argument is not null and is a Float object that represents a float that has the identical bit pattern to the bit pattern of the float represented by this object. For this purpose, two float values are considered to be the same if and only if the method
+ /// returns the same int value when applied to each.
+ /// Note that in most cases, for two instances of class Float, f1 and f2, the value of f1.equals(f2) is true if and only if
+ /// f1.floatValue() == f2.floatValue()
+ /// also has the value true. However, there are two exceptions: If f1 and f2 both represent Float.NaN, then the equals method returns true, even though Float.NaN==Float.NaN has the value false. If f1 represents +0.0f while f2 represents -0.0f, or vice versa, the equal test has the value false, even though 0.0f==-0.0f has the value true. This definition allows hashtables to operate properly.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns the bit representation of a single-float value. The result is a representation of the floating-point argument according to the IEEE 754 floating-point "single precision" bit layout. Bit 31 (the bit that is selected by the mask 0x80000000) represents the sign of the floating-point number. Bits 30-23 (the bits that are selected by the mask 0x7f800000) represent the exponent. Bits 22-0 (the bits that are selected by the mask 0x007fffff) represent the significand (sometimes called the mantissa) of the floating-point number. If the argument is positive infinity, the result is 0x7f800000. If the argument is negative infinity, the result is 0xff800000. If the argument is NaN, the result is 0x7fc00000. In all cases, the result is an integer that, when given to the
- * method, will produce a floating-point value equal to the argument to floatToIntBits.
- */
+ /// Returns the bit representation of a single-float value. The result is a representation of the floating-point argument according to the IEEE 754 floating-point "single precision" bit layout. Bit 31 (the bit that is selected by the mask 0x80000000) represents the sign of the floating-point number. Bits 30-23 (the bits that are selected by the mask 0x7f800000) represent the exponent. Bits 22-0 (the bits that are selected by the mask 0x007fffff) represent the significand (sometimes called the mantissa) of the floating-point number. If the argument is positive infinity, the result is 0x7f800000. If the argument is negative infinity, the result is 0xff800000. If the argument is NaN, the result is 0x7fc00000. In all cases, the result is an integer that, when given to the
+ /// method, will produce a floating-point value equal to the argument to floatToIntBits.
public static int floatToIntBits(float value){
return 0; //TODO codavaj!!
}
- /**
- * Returns the float value of this Float object.
- */
+ /// Returns the float value of this Float object.
public float floatValue(){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this Float object. The result is the integer bit representation, exactly as produced by the method
- * , of the primitive float value represented by this Float object.
- */
+ /// Returns a hashcode for this Float object. The result is the integer bit representation, exactly as produced by the method
+ /// , of the primitive float value represented by this Float object.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the single-float corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "single precision" bit layout.
- * If the argument is 0x7f800000, the result is positive infinity.
- * If the argument is 0xff800000, the result is negative infinity.
- * If the argument is any value in the range 0x7f800001 through 0x7fffffff or in the range 0xff800001 through 0xffffffff, the result is NaN. All IEEE 754 NaN values of type float are, in effect, lumped together by the Java programming language into a single float value called NaN.
- * In all other cases, let s, e, and m be three values that can be computed from the argument:
- * int s = ((bits >> 31) == 0) ? 1 : -1; int e = ((bits >> 23) & 0xff); int m = (e == 0) ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; Then the floating-point result equals the value of the mathematical expression
- * .
- */
+ /// Returns the single-float corresponding to a given bit representation. The argument is considered to be a representation of a floating-point value according to the IEEE 754 floating-point "single precision" bit layout.
+ /// If the argument is 0x7f800000, the result is positive infinity.
+ /// If the argument is 0xff800000, the result is negative infinity.
+ /// If the argument is any value in the range 0x7f800001 through 0x7fffffff or in the range 0xff800001 through 0xffffffff, the result is NaN. All IEEE 754 NaN values of type float are, in effect, lumped together by the Java programming language into a single float value called NaN.
+ /// In all other cases, let s, e, and m be three values that can be computed from the argument:
+ /// int s = ((bits >> 31) == 0) ? 1 : -1; int e = ((bits >> 23) & 0xff); int m = (e == 0) ? (bits & 0x7fffff) << 1 : (bits & 0x7fffff) | 0x800000; Then the floating-point result equals the value of the mathematical expression
+ /// .
public static float intBitsToFloat(int bits){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns the integer value of this Float (by casting to an int).
- */
+ /// Returns the integer value of this Float (by casting to an int).
public int intValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns true if this Float value is infinitely large in magnitude.
- */
+ /// Returns true if this Float value is infinitely large in magnitude.
public boolean isInfinite(){
return false; //TODO codavaj!!
}
- /**
- * Returns true if the specified number is infinitely large in magnitude.
- */
+ /// Returns true if the specified number is infinitely large in magnitude.
public static boolean isInfinite(float v){
return false; //TODO codavaj!!
}
- /**
- * Returns true if this Float value is Not-a-Number (NaN).
- */
+ /// Returns true if this Float value is Not-a-Number (NaN).
public boolean isNaN(){
return false; //TODO codavaj!!
}
- /**
- * Returns true if the specified number is the special Not-a-Number (NaN) value.
- */
+ /// Returns true if the specified number is the special Not-a-Number (NaN) value.
public static boolean isNaN(float v){
return false; //TODO codavaj!!
}
- /**
- * Returns the long value of this Float (by casting to a long).
- */
+ /// Returns the long value of this Float (by casting to a long).
public long longValue(){
return 0l; //TODO codavaj!!
}
- /**
- * Returns a new float initialized to the value represented by the specified String.
- */
+ /// Returns a new float initialized to the value represented by the specified String.
public static float parseFloat(java.lang.String s) throws java.lang.NumberFormatException{
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns the value of this Float as a short (by casting to a short).
- */
+ /// Returns the value of this Float as a short (by casting to a short).
public short shortValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a String representation of this Float object. The primitive float value represented by this object is converted to a String exactly as if by the method toString of one argument.
- */
+ /// Returns a String representation of this Float object. The primitive float value represented by this object is converted to a String exactly as if by the method toString of one argument.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns a String representation for the specified float value. The argument is converted to a readable string format as follows. All characters and characters in strings mentioned below are ASCII characters. If the argument is NaN, the result is the string "NaN". Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude m: If m is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity". If m is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0". If m is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of m, in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of m. If m is less than 10-3 or not less than 107, then it is represented in so-called "computerized scientific notation." Let n be the unique integer such that 10n
- * =m
- * 1; then let a be the mathematically exact quotient of m and 10n so that 1
- * a < 10. The magnitude is then represented as the integer part of a, as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of a, followed by the letter 'E' (E), followed by a representation of n as a decimal integer, as produced by the method
- * of one argument. How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type float. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument f. Then f must be the float value nearest to x; or, if two float values are equally close to xthen f must be one of them and the least significant bit of the significand of f must be 0.
- */
+ /// Returns a String representation for the specified float value. The argument is converted to a readable string format as follows. All characters and characters in strings mentioned below are ASCII characters. If the argument is NaN, the result is the string "NaN". Otherwise, the result is a string that represents the sign and magnitude (absolute value) of the argument. If the sign is negative, the first character of the result is '-' ('-'); if the sign is positive, no sign character appears in the result. As for the magnitude m: If m is infinity, it is represented by the characters "Infinity"; thus, positive infinity produces the result "Infinity" and negative infinity produces the result "-Infinity". If m is zero, it is represented by the characters "0.0"; thus, negative zero produces the result "-0.0" and positive zero produces the result "0.0". If m is greater than or equal to 10-3 but less than 107, then it is represented as the integer part of m, in decimal form with no leading zeroes, followed by '.' (.), followed by one or more decimal digits representing the fractional part of m. If m is less than 10-3 or not less than 107, then it is represented in so-called "computerized scientific notation." Let n be the unique integer such that 10n
+ /// =m
+ /// 1; then let a be the mathematically exact quotient of m and 10n so that 1
+ /// a < 10. The magnitude is then represented as the integer part of a, as a single decimal digit, followed by '.' (.), followed by decimal digits representing the fractional part of a, followed by the letter 'E' (E), followed by a representation of n as a decimal integer, as produced by the method
+ /// of one argument. How many digits must be printed for the fractional part of m or a? There must be at least one digit to represent the fractional part, and beyond that as many, but only as many, more digits as are needed to uniquely distinguish the argument value from adjacent values of type float. That is, suppose that x is the exact mathematical value represented by the decimal representation produced by this method for a finite nonzero argument f. Then f must be the float value nearest to x; or, if two float values are equally close to xthen f must be one of them and the least significant bit of the significand of f must be 0.
public static java.lang.String toString(float f){
return null; //TODO codavaj!!
}
- /**
- * Returns the floating point value represented by the specified String. The string s is interpreted as the representation of a floating-point value and a Float object representing that value is created and returned.
- * If s is null, then a NullPointerException is thrown.
- * Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical syntax rules:
- * where
- * ,
- * are as defined in Section 3.10.2 of the
- * . If it does not have the form of a
- * , then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type float by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic.
- */
+ /// Returns the floating point value represented by the specified String. The string s is interpreted as the representation of a floating-point value and a Float object representing that value is created and returned.
+ /// If s is null, then a NullPointerException is thrown.
+ /// Leading and trailing whitespace characters in s are ignored. The rest of s should constitute a FloatValue as described by the lexical syntax rules:
+ /// where
+ /// ,
+ /// are as defined in Section 3.10.2 of the
+ /// . If it does not have the form of a
+ /// , then a NumberFormatException is thrown. Otherwise, it is regarded as representing an exact decimal value in the usual "computerized scientific notation"; this exact decimal value is then conceptually converted to an "infinitely precise" binary value that is then rounded to type float by the usual round-to-nearest rule of IEEE 754 floating-point arithmetic.
public static java.lang.Float valueOf(java.lang.String s) throws java.lang.NumberFormatException{
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Float valueOf(float i) {
return null;
}
diff --git a/Ports/CLDC11/src/java/lang/IllegalAccessException.java b/Ports/CLDC11/src/java/lang/IllegalAccessException.java
index 4b7d0043ed..c5fe759e5b 100644
--- a/Ports/CLDC11/src/java/lang/IllegalAccessException.java
+++ b/Ports/CLDC11/src/java/lang/IllegalAccessException.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
- * An instance of this class can also be thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the current method does not have access to the appropriate zero-argument constructor.
- * Since: JDK1.0, CLDC 1.0 See Also:Class.forName(java.lang.String), Class.newInstance()
- */
+/// Thrown when an application tries to load in a class, but the currently executing method does not have access to the definition of the specified class, because the class is not public and in another package.
+/// An instance of this class can also be thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the current method does not have access to the appropriate zero-argument constructor.
+/// Since: JDK1.0, CLDC 1.0 See Also:Class.forName(java.lang.String), Class.newInstance()
public class IllegalAccessException extends java.lang.Exception{
- /**
- * Constructs an IllegalAccessException without a detail message.
- */
+ /// Constructs an IllegalAccessException without a detail message.
public IllegalAccessException(){
//TODO codavaj!!
}
- /**
- * Constructs an IllegalAccessException with a detail message.
- * s - the detail message.
- */
+ /// Constructs an IllegalAccessException with a detail message.
+ /// s - the detail message.
public IllegalAccessException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/IllegalArgumentException.java b/Ports/CLDC11/src/java/lang/IllegalArgumentException.java
index 57cc86cc5b..4fef902272 100644
--- a/Ports/CLDC11/src/java/lang/IllegalArgumentException.java
+++ b/Ports/CLDC11/src/java/lang/IllegalArgumentException.java
@@ -22,39 +22,29 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that a method has been passed an illegal or inappropriate argument.
- * Since: JDK1.0, CLDC 1.0 See Also:Thread.setPriority(int)
- */
+/// Thrown to indicate that a method has been passed an illegal or inappropriate argument.
+/// Since: JDK1.0, CLDC 1.0 See Also:Thread.setPriority(int)
public class IllegalArgumentException extends java.lang.RuntimeException{
- /**
- * Constructs an IllegalArgumentException with no detail message.
- */
+ /// Constructs an IllegalArgumentException with no detail message.
public IllegalArgumentException(){
//TODO codavaj!!
}
- /**
- * Constructs an IllegalArgumentException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an IllegalArgumentException with the specified detail message.
+ /// s - the detail message.
public IllegalArgumentException(java.lang.String s){
//TODO codavaj!!
}
- /**
- * Constructs an IllegalArgumentException with the specified detail message and cause.
- * s - the detail message.
- * cause - the cause.
- */
+ /// Constructs an IllegalArgumentException with the specified detail message and cause.
+ /// s - the detail message.
+ /// cause - the cause.
public IllegalArgumentException(java.lang.String s, java.lang.Throwable cause) {
//TODO codavaj!!
}
- /**
- * Constructs an IllegalArgumentException with the specified cause.
- * cause - the cause.
- */
+ /// Constructs an IllegalArgumentException with the specified cause.
+ /// cause - the cause.
public IllegalArgumentException(java.lang.Throwable cause) {
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/IllegalMonitorStateException.java b/Ports/CLDC11/src/java/lang/IllegalMonitorStateException.java
index 59b6dddaae..8fb5d586c8 100644
--- a/Ports/CLDC11/src/java/lang/IllegalMonitorStateException.java
+++ b/Ports/CLDC11/src/java/lang/IllegalMonitorStateException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
- * Since: JDK1.0, CLDC 1.0 See Also:Object.notify(), Object.notifyAll(), Object.wait(), Object.wait(long), Object.wait(long, int)
- */
+/// Thrown to indicate that a thread has attempted to wait on an object's monitor or to notify other threads waiting on an object's monitor without owning the specified monitor.
+/// Since: JDK1.0, CLDC 1.0 See Also:Object.notify(), Object.notifyAll(), Object.wait(), Object.wait(long), Object.wait(long, int)
public class IllegalMonitorStateException extends java.lang.RuntimeException{
- /**
- * Constructs an IllegalMonitorStateException with no detail message.
- */
+ /// Constructs an IllegalMonitorStateException with no detail message.
public IllegalMonitorStateException(){
//TODO codavaj!!
}
- /**
- * Constructs an IllegalMonitorStateException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an IllegalMonitorStateException with the specified detail message.
+ /// s - the detail message.
public IllegalMonitorStateException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/IllegalStateException.java b/Ports/CLDC11/src/java/lang/IllegalStateException.java
index 1d937141bf..e08b65551a 100644
--- a/Ports/CLDC11/src/java/lang/IllegalStateException.java
+++ b/Ports/CLDC11/src/java/lang/IllegalStateException.java
@@ -23,24 +23,17 @@
*/
package java.lang;
-/**
- *
- * @author user2
- */
+/// @author user2
public class IllegalStateException extends RuntimeException {
public IllegalStateException() {}
public IllegalStateException(String s) {}
- /**
- * Constructs an IllegalStateException with the specified detail message and cause.
- * s - the detail message.
- * cause - the cause.
- */
+ /// Constructs an IllegalStateException with the specified detail message and cause.
+ /// s - the detail message.
+ /// cause - the cause.
public IllegalStateException(String s, Throwable cause) {}
- /**
- * Constructs an IllegalStateException with the specified cause.
- * cause - the cause.
- */
+ /// Constructs an IllegalStateException with the specified cause.
+ /// cause - the cause.
public IllegalStateException(Throwable cause) {}
}
diff --git a/Ports/CLDC11/src/java/lang/IllegalThreadStateException.java b/Ports/CLDC11/src/java/lang/IllegalThreadStateException.java
index 79d9c34a07..22decc9ffd 100644
--- a/Ports/CLDC11/src/java/lang/IllegalThreadStateException.java
+++ b/Ports/CLDC11/src/java/lang/IllegalThreadStateException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that a thread is not in an appropriate state for the requested operation. See, for example, the suspend and resume methods in class Thread.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that a thread is not in an appropriate state for the requested operation. See, for example, the suspend and resume methods in class Thread.
+/// Since: JDK1.0, CLDC 1.0
public class IllegalThreadStateException extends java.lang.IllegalArgumentException{
- /**
- * Constructs an IllegalThreadStateException with no detail message.
- */
+ /// Constructs an IllegalThreadStateException with no detail message.
public IllegalThreadStateException(){
//TODO codavaj!!
}
- /**
- * Constructs an IllegalThreadStateException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an IllegalThreadStateException with the specified detail message.
+ /// s - the detail message.
public IllegalThreadStateException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/IncompatibleClassChangeError.java b/Ports/CLDC11/src/java/lang/IncompatibleClassChangeError.java
index 2155a28af6..383843c2ad 100644
--- a/Ports/CLDC11/src/java/lang/IncompatibleClassChangeError.java
+++ b/Ports/CLDC11/src/java/lang/IncompatibleClassChangeError.java
@@ -18,32 +18,29 @@
package java.lang;
-/**
- * {@code IncompatibleClassChangeError} is the superclass of all classes which
- * represent errors that occur when inconsistent class files are loaded into
- * the same running image.
- *
- * @see Error
- */
+/// `IncompatibleClassChangeError` is the superclass of all classes which
+/// represent errors that occur when inconsistent class files are loaded into
+/// the same running image.
+///
+/// #### See also
+///
+/// - Error
public class IncompatibleClassChangeError extends LinkageError {
private static final long serialVersionUID = -4914975503642802119L;
- /**
- * Constructs a new {@code IncompatibleClassChangeError} that includes the
- * current stack trace.
- */
+ /// Constructs a new `IncompatibleClassChangeError` that includes the
+ /// current stack trace.
public IncompatibleClassChangeError() {
super();
}
- /**
- * Constructs a new {@code IncompatibleClassChangeError} with the current
- * stack trace and the specified detail message.
- *
- * @param detailMessage
- * the detail message for this error.
- */
+ /// Constructs a new `IncompatibleClassChangeError` with the current
+ /// stack trace and the specified detail message.
+ ///
+ /// #### Parameters
+ ///
+ /// - `detailMessage`: the detail message for this error.
public IncompatibleClassChangeError(String detailMessage) {
super(detailMessage);
}
diff --git a/Ports/CLDC11/src/java/lang/IndexOutOfBoundsException.java b/Ports/CLDC11/src/java/lang/IndexOutOfBoundsException.java
index a5b59ae067..3bbd97acf6 100644
--- a/Ports/CLDC11/src/java/lang/IndexOutOfBoundsException.java
+++ b/Ports/CLDC11/src/java/lang/IndexOutOfBoundsException.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
- * Applications can subclass this class to indicate similar exceptions.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that an index of some sort (such as to an array, to a string, or to a vector) is out of range.
+/// Applications can subclass this class to indicate similar exceptions.
+/// Since: JDK1.0, CLDC 1.0
public class IndexOutOfBoundsException extends java.lang.RuntimeException{
- /**
- * Constructs an IndexOutOfBoundsException with no detail message.
- */
+ /// Constructs an IndexOutOfBoundsException with no detail message.
public IndexOutOfBoundsException(){
//TODO codavaj!!
}
- /**
- * Constructs an IndexOutOfBoundsException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an IndexOutOfBoundsException with the specified detail message.
+ /// s - the detail message.
public IndexOutOfBoundsException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/InstantiationException.java b/Ports/CLDC11/src/java/lang/InstantiationException.java
index b874239a06..67cc5ac7dc 100644
--- a/Ports/CLDC11/src/java/lang/InstantiationException.java
+++ b/Ports/CLDC11/src/java/lang/InstantiationException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
- * Since: JDK1.0, CLDC 1.0 See Also:Class.newInstance()
- */
+/// Thrown when an application tries to create an instance of a class using the newInstance method in class Class, but the specified class object cannot be instantiated because it is an interface or is an abstract class.
+/// Since: JDK1.0, CLDC 1.0 See Also:Class.newInstance()
public class InstantiationException extends java.lang.Exception{
- /**
- * Constructs an InstantiationException with no detail message.
- */
+ /// Constructs an InstantiationException with no detail message.
public InstantiationException(){
//TODO codavaj!!
}
- /**
- * Constructs an InstantiationException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an InstantiationException with the specified detail message.
+ /// s - the detail message.
public InstantiationException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Integer.java b/Ports/CLDC11/src/java/lang/Integer.java
index 518703798c..9cda08451c 100644
--- a/Ports/CLDC11/src/java/lang/Integer.java
+++ b/Ports/CLDC11/src/java/lang/Integer.java
@@ -22,215 +22,180 @@
* have any questions.
*/
package java.lang;
-/**
- * The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.
- * In addition, this class provides several methods for converting an int to a String and a String to an int, as well as other constants and methods useful when dealing with an int.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The Integer class wraps a value of the primitive type int in an object. An object of type Integer contains a single field whose type is int.
+/// In addition, this class provides several methods for converting an int to a String and a String to an int, as well as other constants and methods useful when dealing with an int.
+/// Since: JDK1.0, CLDC 1.0
public final class Integer extends Number implements Comparable {
public static final Class TYPE = int.class;
- /**
- * The largest value of type int. The constant value of this field is 2147483647.
- * See Also:Constant Field Values
- */
+ /// The largest value of type int. The constant value of this field is 2147483647.
+ /// See Also:Constant Field Values
public static final int MAX_VALUE=2147483647;
- /**
- * The smallest value of type int. The constant value of this field is -2147483648.
- * See Also:Constant Field Values
- */
+ /// The smallest value of type int. The constant value of this field is -2147483648.
+ /// See Also:Constant Field Values
public static final int MIN_VALUE=-2147483648;
- /**
- * Constructs a newly allocated Integer object that represents the primitive int argument.
- * value - the value to be represented by the Integer.
- */
+ /// Constructs a newly allocated Integer object that represents the primitive int argument.
+ /// value - the value to be represented by the Integer.
public Integer(int value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Integer as a byte.
- */
+ /// Returns the value of this Integer as a byte.
public byte byteValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Integer as a double.
- */
+ /// Returns the value of this Integer as a double.
public double doubleValue(){
return 0.0d; //TODO codavaj!!
}
- /**
- * Compares this object to the specified object. The result is true if and only if the argument is not null and is an Integer object that contains the same int value as this object.
- */
+ /// Compares this object to the specified object. The result is true if and only if the argument is not null and is an Integer object that contains the same int value as this object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns the value of this Integer as a float.
- */
+ /// Returns the value of this Integer as a float.
public float floatValue(){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this Integer.
- */
+ /// Returns a hashcode for this Integer.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Integer as an int.
- */
+ /// Returns the value of this Integer as an int.
public int intValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Integer as a long.
- */
+ /// Returns the value of this Integer as a long.
public long longValue(){
return 0l; //TODO codavaj!!
}
- /**
- * Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('
- * u002d') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the
- * method.
- */
+ /// Parses the string argument as a signed decimal integer. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' ('
+ /// u002d') to indicate a negative value. The resulting integer value is returned, exactly as if the argument and the radix 10 were given as arguments to the
+ /// method.
public static int parseInt(java.lang.String s) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Parses the string argument as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether
- * returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('
- * u002d') to indicate a negative value. The resulting integer value is returned.
- * An exception of type NumberFormatException is thrown if any of the following situations occurs: The first argument is null or is a string of length zero. The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX. Any character of the string is not a digit of the specified radix, except that the first character may be a minus sign '-' ('u002d') provided that the string is longer than length 1. The integer value represented by the string is not a value of type int.
- * Examples:
- * parseInt("0", 10) returns 0 parseInt("473", 10) returns 473 parseInt("-0", 10) returns 0 parseInt("-FF", 16) returns -255 parseInt("1100110", 2) returns 102 parseInt("2147483647", 10) returns 2147483647 parseInt("-2147483648", 10) returns -2147483648 parseInt("2147483648", 10) throws a NumberFormatException parseInt("99", 8) throws a NumberFormatException parseInt("Kona", 10) throws a NumberFormatException parseInt("Kona", 27) returns 411787
- */
+ /// Parses the string argument as a signed integer in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether
+ /// returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('
+ /// u002d') to indicate a negative value. The resulting integer value is returned.
+ /// An exception of type NumberFormatException is thrown if any of the following situations occurs: The first argument is null or is a string of length zero. The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX. Any character of the string is not a digit of the specified radix, except that the first character may be a minus sign '-' ('u002d') provided that the string is longer than length 1. The integer value represented by the string is not a value of type int.
+ /// Examples:
+ /// parseInt("0", 10) returns 0 parseInt("473", 10) returns 473 parseInt("-0", 10) returns 0 parseInt("-FF", 16) returns -255 parseInt("1100110", 2) returns 102 parseInt("2147483647", 10) returns 2147483647 parseInt("-2147483648", 10) returns -2147483648 parseInt("2147483648", 10) throws a NumberFormatException parseInt("99", 8) throws a NumberFormatException parseInt("Kona", 10) throws a NumberFormatException parseInt("Kona", 27) returns 411787
public static int parseInt(java.lang.String s, int radix) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Integer as a short.
- */
+ /// Returns the value of this Integer as a short.
public short shortValue(){
return 0; //TODO codavaj!!
}
- /**
- * Creates a string representation of the integer argument as an unsigned integer in base
- * 2.
- * The unsigned integer value is the argument plus 232if the argument is negative; otherwise it is equal to the argument. This value is converted to a string of ASCII digits in binary (base2) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The characters '0' ('u0030') and '1' ('u0031') are used as binary digits.
- */
+ /// Creates a string representation of the integer argument as an unsigned integer in base
+ /// 2.
+ /// The unsigned integer value is the argument plus 232if the argument is negative; otherwise it is equal to the argument. This value is converted to a string of ASCII digits in binary (base2) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The characters '0' ('u0030') and '1' ('u0031') are used as binary digits.
public static java.lang.String toBinaryString(int i){
return null; //TODO codavaj!!
}
- /**
- * Creates a string representation of the integer argument as an unsigned integer in base
- * 16.
- * The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in hexadecimal (base16) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as hexadecimal digits:
- * 0123456789abcdef These are the characters '
- * u0030' through '
- * u0039' and 'u\0039' through '
- * u0066'.
- */
+ /// Creates a string representation of the integer argument as an unsigned integer in base
+ /// 16.
+ /// The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in hexadecimal (base16) with no extra leading 0s. If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The following characters are used as hexadecimal digits:
+ /// 0123456789abcdef These are the characters '
+ /// u0030' through '
+ /// u0039' and 'u\0039' through '
+ /// u0066'.
public static java.lang.String toHexString(int i){
return null; //TODO codavaj!!
}
- /**
- * Creates a string representation of the integer argument as an unsigned integer in base 8.
- * The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in octal (base8) with no extra leading 0s.
- * If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The octal digits are:
- * 01234567 These are the characters '
- * u0030' through '
- * u0037'.
- */
+ /// Creates a string representation of the integer argument as an unsigned integer in base 8.
+ /// The unsigned integer value is the argument plus 232 if the argument is negative; otherwise, it is equal to the argument. This value is converted to a string of ASCII digits in octal (base8) with no extra leading 0s.
+ /// If the unsigned magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the unsigned magnitude will not be the zero character. The octal digits are:
+ /// 01234567 These are the characters '
+ /// u0030' through '
+ /// u0037'.
public static java.lang.String toOctalString(int i){
return null; //TODO codavaj!!
}
- /**
- * Returns a String object representing this Integer's value. The value is converted to signed decimal representation and returned as a string, exactly as if the integer value were given as an argument to the
- * method.
- */
+ /// Returns a String object representing this Integer's value. The value is converted to signed decimal representation and returned as a string, exactly as if the integer value were given as an argument to the
+ /// method.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and radix 10 were given as arguments to the
- * method.
- */
+ /// Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and radix 10 were given as arguments to the
+ /// method.
public static java.lang.String toString(int i){
return null; //TODO codavaj!!
}
- /**
- * Creates a string representation of the first argument in the radix specified by the second argument.
- * If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.
- * If the first argument is negative, the first element of the result is the ASCII minus character '-' ('u002d'). If the first argument is not negative, no sign character appears in the result.
- * The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:
- * 0123456789abcdefghijklmnopqrstuvwxyz These are '
- * u0030' through '
- * u0039' and '
- * u0061' through '
- * u007a'. If the radix is N, then the first N of these characters are used as radix-N digits in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef.
- */
+ /// Creates a string representation of the first argument in the radix specified by the second argument.
+ /// If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.
+ /// If the first argument is negative, the first element of the result is the ASCII minus character '-' ('u002d'). If the first argument is not negative, no sign character appears in the result.
+ /// The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:
+ /// 0123456789abcdefghijklmnopqrstuvwxyz These are '
+ /// u0030' through '
+ /// u0039' and '
+ /// u0061' through '
+ /// u007a'. If the radix is N, then the first N of these characters are used as radix-N digits in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef.
public static java.lang.String toString(int i, int radix){
return null; //TODO codavaj!!
}
- /**
- * Returns a new Integer object initialized to the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the
- * method. The result is an Integer object that represents the integer value specified by the string.
- * In other words, this method returns an Integer object equal to the value of:
- * new Integer(Integer.parseInt(s))
- */
+ /// Returns a new Integer object initialized to the value of the specified String. The argument is interpreted as representing a signed decimal integer, exactly as if the argument were given to the
+ /// method. The result is an Integer object that represents the integer value specified by the string.
+ /// In other words, this method returns an Integer object equal to the value of:
+ /// new Integer(Integer.parseInt(s))
public static java.lang.Integer valueOf(java.lang.String s) throws java.lang.NumberFormatException{
return null; //TODO codavaj!!
}
- /**
- * Returns a new Integer object initialized to the value of the specified String. The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the
- * method. The result is an Integer object that represents the integer value specified by the string.
- * In other words, this method returns an Integer object equal to the value of:
- * new Integer(Integer.parseInt(s, radix))
- */
+ /// Returns a new Integer object initialized to the value of the specified String. The first argument is interpreted as representing a signed integer in the radix specified by the second argument, exactly as if the arguments were given to the
+ /// method. The result is an Integer object that represents the integer value specified by the string.
+ /// In other words, this method returns an Integer object equal to the value of:
+ /// new Integer(Integer.parseInt(s, radix))
public static java.lang.Integer valueOf(java.lang.String s, int radix) throws java.lang.NumberFormatException{
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Integer valueOf(int i) {
return null;
}
- /**
- * Returns the value of the {@code signum} function for the specified
- * integer.
- *
- * @param i
- * the integer value to check.
- * @return -1 if {@code i} is negative, 1 if {@code i} is positive, 0 if
- * {@code i} is zero.
- * @since 1.5
- */
+ /// Returns the value of the `signum` function for the specified
+ /// integer.
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the integer value to check.
+ ///
+ /// #### Returns
+ ///
+ /// @return -1 if `i` is negative, 1 if `i` is positive, 0 if
+ /// `i` is zero.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static int signum(int i) {
return (i >> 31) | (-i >>> 31); // Hacker's delight 2-7
}
diff --git a/Ports/CLDC11/src/java/lang/InterruptedException.java b/Ports/CLDC11/src/java/lang/InterruptedException.java
index 7532f4cc22..698d558a27 100644
--- a/Ports/CLDC11/src/java/lang/InterruptedException.java
+++ b/Ports/CLDC11/src/java/lang/InterruptedException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it.
- * Since: JDK1.0, CLDC 1.0 See Also:Object.wait(), Object.wait(long), Object.wait(long, int), Thread.sleep(long)
- */
+/// Thrown when a thread is waiting, sleeping, or otherwise paused for a long time and another thread interrupts it.
+/// Since: JDK1.0, CLDC 1.0 See Also:Object.wait(), Object.wait(long), Object.wait(long, int), Thread.sleep(long)
public class InterruptedException extends java.lang.Exception{
- /**
- * Constructs an InterruptedException with no detail message.
- */
+ /// Constructs an InterruptedException with no detail message.
public InterruptedException(){
//TODO codavaj!!
}
- /**
- * Constructs an InterruptedException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an InterruptedException with the specified detail message.
+ /// s - the detail message.
public InterruptedException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Iterable.java b/Ports/CLDC11/src/java/lang/Iterable.java
index 31883fb0b8..66f86db1f6 100644
--- a/Ports/CLDC11/src/java/lang/Iterable.java
+++ b/Ports/CLDC11/src/java/lang/Iterable.java
@@ -18,18 +18,18 @@
import java.util.Iterator;
-/**
- * Objects of classes that implement this interface can be used within a
- * {@code foreach} statement.
- *
- * @since 1.5
- */
+/// Objects of classes that implement this interface can be used within a
+/// `foreach` statement.
+///
+/// #### Since
+///
+/// 1.5
public interface Iterable {
- /**
- * Returns an {@link Iterator} for the elements in this object.
- *
- * @return An {@code Iterator} instance.
- */
+ /// Returns an `Iterator` for the elements in this object.
+ ///
+ /// #### Returns
+ ///
+ /// An `Iterator` instance.
Iterator iterator();
}
diff --git a/Ports/CLDC11/src/java/lang/LinkageError.java b/Ports/CLDC11/src/java/lang/LinkageError.java
index 061f3dc640..7a8a458828 100644
--- a/Ports/CLDC11/src/java/lang/LinkageError.java
+++ b/Ports/CLDC11/src/java/lang/LinkageError.java
@@ -18,31 +18,28 @@
package java.lang;
-/**
- * {@code LinkageError} is the superclass of all error classes that occur when
- * loading and linking class files.
- *
- * @see Error
- */
+/// `LinkageError` is the superclass of all error classes that occur when
+/// loading and linking class files.
+///
+/// #### See also
+///
+/// - Error
public class LinkageError extends Error {
private static final long serialVersionUID = 3579600108157160122L;
- /**
- * Constructs a new {@code LinkageError} that includes the current stack
- * trace.
- */
+ /// Constructs a new `LinkageError` that includes the current stack
+ /// trace.
public LinkageError() {
super();
}
- /**
- * Constructs a new {@code LinkageError} with the current stack trace and
- * the specified detail message.
- *
- * @param detailMessage
- * the detail message for this error.
- */
+ /// Constructs a new `LinkageError` with the current stack trace and
+ /// the specified detail message.
+ ///
+ /// #### Parameters
+ ///
+ /// - `detailMessage`: the detail message for this error.
public LinkageError(String detailMessage) {
super(detailMessage);
}
diff --git a/Ports/CLDC11/src/java/lang/Long.java b/Ports/CLDC11/src/java/lang/Long.java
index 97181599cd..442dd006c9 100644
--- a/Ports/CLDC11/src/java/lang/Long.java
+++ b/Ports/CLDC11/src/java/lang/Long.java
@@ -22,140 +22,112 @@
* have any questions.
*/
package java.lang;
-/**
- * The Long class wraps a value of the primitive type long in an object. An object of type Long contains a single field whose type is long.
- * In addition, this class provides several methods for converting a long to a String and a String to a long, as well as other constants and methods useful when dealing with a long.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The Long class wraps a value of the primitive type long in an object. An object of type Long contains a single field whose type is long.
+/// In addition, this class provides several methods for converting a long to a String and a String to a long, as well as other constants and methods useful when dealing with a long.
+/// Since: JDK1.0, CLDC 1.0
public final class Long extends Number implements Comparable{
public static Class TYPE = long.class;
- /**
- * The largest value of type long.
- * See Also:Constant Field Values
- */
+ /// The largest value of type long.
+ /// See Also:Constant Field Values
public static final long MAX_VALUE=9223372036854775807l;
- /**
- * The smallest value of type long.
- * See Also:Constant Field Values
- */
+ /// The smallest value of type long.
+ /// See Also:Constant Field Values
public static final long MIN_VALUE=-9223372036854775808l;
- /**
- * Constructs a newly allocated Long object that represents the primitive long argument.
- * value - the value to be represented by the Long object.
- */
+ /// Constructs a newly allocated Long object that represents the primitive long argument.
+ /// value - the value to be represented by the Long object.
public Long(long value){
//TODO codavaj!!
}
- /**
- * Returns the value of this Long as a double.
- */
+ /// Returns the value of this Long as a double.
public double doubleValue(){
return 0.0d; //TODO codavaj!!
}
- /**
- * Compares this object against the specified object. The result is true if and only if the argument is not null and is a Long object that contains the same long value as this object.
- */
+ /// Compares this object against the specified object. The result is true if and only if the argument is not null and is a Long object that contains the same long value as this object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns the value of this Long as a float.
- */
+ /// Returns the value of this Long as a float.
public float floatValue(){
return 0.0f; //TODO codavaj!!
}
- /**
- * Computes a hashcode for this Long. The result is the exclusive OR of the two halves of the primitive long value represented by this Long object. That is, the hashcode is the value of the expression: (int)(this.longValue()^(this.longValue()>>>32))
- */
+ /// Computes a hashcode for this Long. The result is the exclusive OR of the two halves of the primitive long value represented by this Long object. That is, the hashcode is the value of the expression: (int)(this.longValue()^(this.longValue()>>>32))
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Long as a long value.
- */
+ /// Returns the value of this Long as a long value.
public long longValue(){
return 0l; //TODO codavaj!!
}
- /**
- * Returns the value of this Long as an int value.
- */
+ /// Returns the value of this Long as an int value.
public int intValue() {
return 0;
}
- /**
- * Returns the value of this Long as a byte value.
- */
+ /// Returns the value of this Long as a byte value.
public byte byteValue() {
return (byte)0;
}
- /**
- * Parses the string argument as a signed decimal long. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' (
- * u002d') to indicate a negative value. The resulting long value is returned, exactly as if the argument and the radix 10 were given as arguments to the
- * method that takes two arguments.
- * Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.
- */
+ /// Parses the string argument as a signed decimal long. The characters in the string must all be decimal digits, except that the first character may be an ASCII minus sign '-' (
+ /// u002d') to indicate a negative value. The resulting long value is returned, exactly as if the argument and the radix 10 were given as arguments to the
+ /// method that takes two arguments.
+ /// Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code.
public static long parseLong(java.lang.String s) throws java.lang.NumberFormatException{
return 0l; //TODO codavaj!!
}
- /**
- * Parses the string argument as a signed long in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('
- * u002d' to indicate a negative value. The resulting long value is returned.
- * Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code - except that either L or l may appear as a digit for a radix greater than 22.
- * An exception of type NumberFormatException is thrown if any of the following situations occurs: The first argument is null or is a string of length zero. The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX. The first character of the string is not a digit of the specified radix and is not a minus sign '-' ('u002d'). The first character of the string is a minus sign and the string is of length 1. Any character of the string after the first is not a digit of the specified radix. The integer value represented by the string cannot be represented as a value of type long.
- * Examples:
- * parseLong("0", 10) returns 0L parseLong("473", 10) returns 473L parseLong("-0", 10) returns 0L parseLong("-FF", 16) returns -255L parseLong("1100110", 2) returns 102L parseLong("99", 8) throws a NumberFormatException parseLong("Hazelnut", 10) throws a NumberFormatException parseLong("Hazelnut", 36) returns 1356099454469L
- */
+ /// Parses the string argument as a signed long in the radix specified by the second argument. The characters in the string must all be digits of the specified radix (as determined by whether Character.digit returns a nonnegative value), except that the first character may be an ASCII minus sign '-' ('
+ /// u002d' to indicate a negative value. The resulting long value is returned.
+ /// Note that neither L nor l is permitted to appear at the end of the string as a type indicator, as would be permitted in Java programming language source code - except that either L or l may appear as a digit for a radix greater than 22.
+ /// An exception of type NumberFormatException is thrown if any of the following situations occurs: The first argument is null or is a string of length zero. The radix is either smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX. The first character of the string is not a digit of the specified radix and is not a minus sign '-' ('u002d'). The first character of the string is a minus sign and the string is of length 1. Any character of the string after the first is not a digit of the specified radix. The integer value represented by the string cannot be represented as a value of type long.
+ /// Examples:
+ /// parseLong("0", 10) returns 0L parseLong("473", 10) returns 473L parseLong("-0", 10) returns 0L parseLong("-FF", 16) returns -255L parseLong("1100110", 2) returns 102L parseLong("99", 8) throws a NumberFormatException parseLong("Hazelnut", 10) throws a NumberFormatException parseLong("Hazelnut", 36) returns 1356099454469L
public static long parseLong(java.lang.String s, int radix) throws java.lang.NumberFormatException{
return 0l; //TODO codavaj!!
}
- /**
- * Returns a String object representing this Long's value. The long integer value represented by this Long object is converted to signed decimal representation and returned as a string, exactly as if the long value were given as an argument to the
- * method that takes one argument.
- */
+ /// Returns a String object representing this Long's value. The long integer value represented by this Long object is converted to signed decimal representation and returned as a string, exactly as if the long value were given as an argument to the
+ /// method that takes one argument.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and the radix 10 were given as arguments to the
- * method that takes two arguments.
- */
+ /// Returns a new String object representing the specified integer. The argument is converted to signed decimal representation and returned as a string, exactly as if the argument and the radix 10 were given as arguments to the
+ /// method that takes two arguments.
public static java.lang.String toString(long i){
return null; //TODO codavaj!!
}
- /**
- * Creates a string representation of the first argument in the radix specified by the second argument.
- * If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.
- * If the first argument is negative, the first element of the result is the ASCII minus sign '-' ('u002d'. If the first argument is not negative, no sign character appears in the result.
- * The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:
- * 0123456789abcdefghijklmnopqrstuvwxyz These are '
- * u0030' through '
- * u0039' and '
- * u0061' through '
- * u007a'. If the radix is N, then the first N of these characters are used as radix-N digits in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef.
- */
+ /// Creates a string representation of the first argument in the radix specified by the second argument.
+ /// If the radix is smaller than Character.MIN_RADIX or larger than Character.MAX_RADIX, then the radix 10 is used instead.
+ /// If the first argument is negative, the first element of the result is the ASCII minus sign '-' ('u002d'. If the first argument is not negative, no sign character appears in the result.
+ /// The remaining characters of the result represent the magnitude of the first argument. If the magnitude is zero, it is represented by a single zero character '0' ('u0030'); otherwise, the first character of the representation of the magnitude will not be the zero character. The following ASCII characters are used as digits:
+ /// 0123456789abcdefghijklmnopqrstuvwxyz These are '
+ /// u0030' through '
+ /// u0039' and '
+ /// u0061' through '
+ /// u007a'. If the radix is N, then the first N of these characters are used as radix-N digits in the order shown. Thus, the digits for hexadecimal (radix 16) are 0123456789abcdef.
public static java.lang.String toString(long i, int radix){
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Long valueOf(long i) {
return null;
}
diff --git a/Ports/CLDC11/src/java/lang/Math.java b/Ports/CLDC11/src/java/lang/Math.java
index fddac9c222..8129b172ad 100644
--- a/Ports/CLDC11/src/java/lang/Math.java
+++ b/Ports/CLDC11/src/java/lang/Math.java
@@ -22,187 +22,148 @@
* have any questions.
*/
package java.lang;
-/**
- * The class Math contains methods for performing basic numeric operations.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The class Math contains methods for performing basic numeric operations.
+/// Since: JDK1.0, CLDC 1.0
public final class Math{
- /**
- * The double value that is closer than any other to e, the base of the natural logarithms.
- * Since: CLDC 1.1 See Also:Constant Field Values
- */
+ /// The double value that is closer than any other to e, the base of the natural logarithms.
+ /// Since: CLDC 1.1 See Also:Constant Field Values
public static final double E=2.718281828459045d;
- /**
- * The double value that is closer than any other to
- * , the ratio of the circumference of a circle to its diameter.
- * Since: CLDC 1.1 See Also:Constant Field Values
- */
+ /// The double value that is closer than any other to
+ /// , the ratio of the circumference of a circle to its diameter.
+ /// Since: CLDC 1.1 See Also:Constant Field Values
public static final double PI=3.141592653589793d;
- /**
- * Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
- * Double.longBitsToDouble((Double.doubleToLongBits(a)<<1)>>>1)
- */
+ /// Returns the absolute value of a double value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
+ /// Double.longBitsToDouble((Double.doubleToLongBits(a)>>1)
public static double abs(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
- * Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
- */
+ /// Returns the absolute value of a float value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned. Special cases: If the argument is positive zero or negative zero, the result is positive zero. If the argument is infinite, the result is positive infinity. If the argument is NaN, the result is NaN. In other words, the result is equal to the value of the expression:
+ /// Float.intBitsToFloat(0x7fffffff & Float.floatToIntBits(a))
public static float abs(float a){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
- * Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.
- */
+ /// Returns the absolute value of an int value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
+ /// Note that if the argument is equal to the value of Integer.MIN_VALUE, the most negative representable int value, the result is that same value, which is negative.
public static int abs(int a){
return 0; //TODO codavaj!!
}
- /**
- * Returns the absolute value of a long value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
- * Note that if the argument is equal to the value of Long.MIN_VALUE, the most negative representable long value, the result is that same value, which is negative.
- */
+ /// Returns the absolute value of a long value. If the argument is not negative, the argument is returned. If the argument is negative, the negation of the argument is returned.
+ /// Note that if the argument is equal to the value of Long.MIN_VALUE, the most negative representable long value, the result is that same value, which is negative.
public static long abs(long a){
return 0l; //TODO codavaj!!
}
- /**
- * Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer. Special cases: If the argument value is already equal to a mathematical integer, then the result is the same as the argument. If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument. If the argument value is less than zero but greater than -1.0, then the result is negative zero. Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
- */
+ /// Returns the smallest (closest to negative infinity) double value that is not less than the argument and is equal to a mathematical integer. Special cases: If the argument value is already equal to a mathematical integer, then the result is the same as the argument. If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument. If the argument value is less than zero but greater than -1.0, then the result is negative zero. Note that the value of Math.ceil(x) is exactly the value of -Math.floor(-x).
public static double ceil(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the trigonometric cosine of an angle. Special case: If the argument is NaN or an infinity, then the result is NaN.
- */
+ /// Returns the trigonometric cosine of an angle. Special case: If the argument is NaN or an infinity, then the result is NaN.
public static double cos(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer. Special cases: If the argument value is already equal to a mathematical integer, then the result is the same as the argument. If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
- */
+ /// Returns the largest (closest to positive infinity) double value that is not greater than the argument and is equal to a mathematical integer. Special cases: If the argument value is already equal to a mathematical integer, then the result is the same as the argument. If the argument is NaN or an infinity or positive zero or negative zero, then the result is the same as the argument.
public static double floor(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
- */
+ /// Returns the greater of two double values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
public static double max(double a, double b){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
- */
+ /// Returns the greater of two float values. That is, the result is the argument closer to positive infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other negative zero, the result is positive zero.
public static float max(float a, float b){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns the greater of two int values. That is, the result is the argument closer to the value of Integer.MAX_VALUE. If the arguments have the same value, the result is that same value.
- */
+ /// Returns the greater of two int values. That is, the result is the argument closer to the value of Integer.MAX_VALUE. If the arguments have the same value, the result is that same value.
public static int max(int a, int b){
return 0; //TODO codavaj!!
}
- /**
- * Returns the greater of two long values. That is, the result is the argument closer to the value of Long.MAX_VALUE. If the arguments have the same value, the result is that same value.
- */
+ /// Returns the greater of two long values. That is, the result is the argument closer to the value of Long.MAX_VALUE. If the arguments have the same value, the result is that same value.
public static long max(long a, long b){
return 0l; //TODO codavaj!!
}
- /**
- * Returns the smaller of two double values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
- */
+ /// Returns the smaller of two double values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
public static double min(double a, double b){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the smaller of two float values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
- */
+ /// Returns the smaller of two float values. That is, the result is the value closer to negative infinity. If the arguments have the same value, the result is that same value. If either value is NaN, then the result is NaN. Unlike the the numerical comparison operators, this method considers negative zero to be strictly smaller than positive zero. If one argument is positive zero and the other is negative zero, the result is negative zero.
public static float min(float a, float b){
return 0.0f; //TODO codavaj!!
}
- /**
- * Returns the smaller of two int values. That is, the result the argument closer to the value of Integer.MIN_VALUE. If the arguments have the same value, the result is that same value.
- */
+ /// Returns the smaller of two int values. That is, the result the argument closer to the value of Integer.MIN_VALUE. If the arguments have the same value, the result is that same value.
public static int min(int a, int b){
return 0; //TODO codavaj!!
}
- /**
- * Returns the smaller of two long values. That is, the result is the argument closer to the value of Long.MIN_VALUE. If the arguments have the same value, the result is that same value.
- */
+ /// Returns the smaller of two long values. That is, the result is the argument closer to the value of Long.MIN_VALUE. If the arguments have the same value, the result is that same value.
public static long min(long a, long b){
return 0l; //TODO codavaj!!
}
- /**
- * Returns the trigonometric sine of an angle. Special cases: If the argument is NaN or an infinity, then the result is NaN. If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
- */
+ /// Returns the trigonometric sine of an angle. Special cases: If the argument is NaN or an infinity, then the result is NaN. If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero.
public static double sin(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the correctly rounded positive square root of a double value. Special cases: If the argument is NaN or less than zero, then the result is NaN. If the argument is positive infinity, then the result is positive infinity. If the argument is positive zero or negative zero, then the result is the same as the argument.
- */
+ /// Returns the correctly rounded positive square root of a double value. Special cases: If the argument is NaN or less than zero, then the result is NaN. If the argument is positive infinity, then the result is positive infinity. If the argument is positive zero or negative zero, then the result is the same as the argument.
public static double sqrt(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the trigonometric tangent of an angle. Special cases: If the argument is NaN or an infinity, then the result is NaN. If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero
- */
+ /// Returns the trigonometric tangent of an angle. Special cases: If the argument is NaN or an infinity, then the result is NaN. If the argument is positive zero, then the result is positive zero; if the argument is negative zero, then the result is negative zero
public static double tan(double a){
return 0.0d; //TODO codavaj!!
}
- /**
- * Converts an angle measured in radians to the equivalent angle measured in degrees.
- */
+ /// Converts an angle measured in radians to the equivalent angle measured in degrees.
public static double toDegrees(double angrad){
return 0.0d; //TODO codavaj!!
}
- /**
- * Converts an angle measured in degrees to the equivalent angle measured in radians.
- */
+ /// Converts an angle measured in degrees to the equivalent angle measured in radians.
public static double toRadians(double angdeg){
return 0.0d; //TODO codavaj!!
}
- /**
- * Returns the result of rounding the argument to an integer. The result is
- * equivalent to {@code (long) Math.floor(d+0.5)}.
- *
- *
- * @param d
- * the value to be rounded.
- * @return the closest integer to the argument.
- */
+ /// Returns the result of rounding the argument to an integer. The result is
+ /// equivalent to `(long) Math.floor(d+0.5)`.
+ ///
+ /// Special cases:
+ ///
+ /// - `round(+0.0) = (long) +0.0`
+ ///
+ /// - `round(-0.0) = (long) +0.0`
+ ///
+ /// - `round((anything > Long.MAX_VALUE) = Long.MAX_VALUE`
+ ///
+ /// - `round((anything < Long.MIN_VALUE) = Long.MIN_VALUE`
+ ///
+ /// - `round(+infinity) = Long.MAX_VALUE`
+ ///
+ /// - `round(-infinity) = Long.MIN_VALUE`
+ ///
+ /// - `round(NaN) = (long) +0.0`
+ ///
+ /// #### Parameters
+ ///
+ /// - `d`: the value to be rounded.
+ ///
+ /// #### Returns
+ ///
+ /// the closest integer to the argument.
public static long round(double d) {
// check for NaN
if (d != d) {
@@ -211,25 +172,32 @@ public static long round(double d) {
return (long) floor(d + 0.5d);
}
- /**
- * Returns the result of rounding the argument to an integer. The result is
- * equivalent to {@code (int) Math.floor(f+0.5)}.
- *
- *
- * @param f
- * the value to be rounded.
- * @return the closest integer to the argument.
- */
+ /// Returns the result of rounding the argument to an integer. The result is
+ /// equivalent to `(int) Math.floor(f+0.5)`.
+ ///
+ /// Special cases:
+ ///
+ /// - `round(+0.0) = (int) +0.0`
+ ///
+ /// - `round(-0.0) = (int) +0.0`
+ ///
+ /// - `round((anything > Integer.MAX_VALUE) = Integer.MAX_VALUE`
+ ///
+ /// - `round((anything < Integer.MIN_VALUE) = Integer.MIN_VALUE`
+ ///
+ /// - `round(+infinity) = Integer.MAX_VALUE`
+ ///
+ /// - `round(-infinity) = Integer.MIN_VALUE`
+ ///
+ /// - `round(NaN) = (int) +0.0`
+ ///
+ /// #### Parameters
+ ///
+ /// - `f`: the value to be rounded.
+ ///
+ /// #### Returns
+ ///
+ /// the closest integer to the argument.
public static int round(float f) {
// check for NaN
if (f != f) {
diff --git a/Ports/CLDC11/src/java/lang/NegativeArraySizeException.java b/Ports/CLDC11/src/java/lang/NegativeArraySizeException.java
index 7c53c33e00..faefbed32d 100644
--- a/Ports/CLDC11/src/java/lang/NegativeArraySizeException.java
+++ b/Ports/CLDC11/src/java/lang/NegativeArraySizeException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown if an application tries to create an array with negative size.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown if an application tries to create an array with negative size.
+/// Since: JDK1.0, CLDC 1.0
public class NegativeArraySizeException extends java.lang.RuntimeException{
- /**
- * Constructs a NegativeArraySizeException with no detail message.
- */
+ /// Constructs a NegativeArraySizeException with no detail message.
public NegativeArraySizeException(){
//TODO codavaj!!
}
- /**
- * Constructs a NegativeArraySizeException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a NegativeArraySizeException with the specified detail message.
+ /// s - the detail message.
public NegativeArraySizeException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/NoClassDefFoundError.java b/Ports/CLDC11/src/java/lang/NoClassDefFoundError.java
index 166d4a304b..10df79daac 100644
--- a/Ports/CLDC11/src/java/lang/NoClassDefFoundError.java
+++ b/Ports/CLDC11/src/java/lang/NoClassDefFoundError.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown if the Java Virtual Machine tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
- * The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.
- * Since: JDK1.0, CLDC 1.1
- */
+/// Thrown if the Java Virtual Machine tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.
+/// The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.
+/// Since: JDK1.0, CLDC 1.1
public class NoClassDefFoundError extends java.lang.Error{
- /**
- * Constructs a NoClassDefFoundError with no detail message.
- */
+ /// Constructs a NoClassDefFoundError with no detail message.
public NoClassDefFoundError(){
//TODO codavaj!!
}
- /**
- * Constructs a NoClassDefFoundError with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a NoClassDefFoundError with the specified detail message.
+ /// s - the detail message.
public NoClassDefFoundError(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/NoSuchFieldError.java b/Ports/CLDC11/src/java/lang/NoSuchFieldError.java
index 9b479f644b..7ac9d81f6b 100644
--- a/Ports/CLDC11/src/java/lang/NoSuchFieldError.java
+++ b/Ports/CLDC11/src/java/lang/NoSuchFieldError.java
@@ -17,31 +17,26 @@
package java.lang;
-/**
- * Thrown when the virtual machine notices that a program tries to reference,
- * on a class or object, a field that does not exist.
- *
- * Note that this can only occur when inconsistent class files are being loaded.
- */
+/// Thrown when the virtual machine notices that a program tries to reference,
+/// on a class or object, a field that does not exist.
+///
+/// Note that this can only occur when inconsistent class files are being loaded.
public class NoSuchFieldError extends IncompatibleClassChangeError {
private static final long serialVersionUID = -3456430195886129035L;
- /**
- * Constructs a new {@code NoSuchFieldError} that includes the current stack
- * trace.
- */
+ /// Constructs a new `NoSuchFieldError` that includes the current stack
+ /// trace.
public NoSuchFieldError() {
super();
}
- /**
- * Constructs a new {@code NoSuchFieldError} with the current stack trace
- * and the specified detail message.
- *
- * @param detailMessage
- * the detail message for this error.
- */
+ /// Constructs a new `NoSuchFieldError` with the current stack trace
+ /// and the specified detail message.
+ ///
+ /// #### Parameters
+ ///
+ /// - `detailMessage`: the detail message for this error.
public NoSuchFieldError(String detailMessage) {
super(detailMessage);
}
diff --git a/Ports/CLDC11/src/java/lang/NullPointerException.java b/Ports/CLDC11/src/java/lang/NullPointerException.java
index 461967121b..213b83d1b1 100644
--- a/Ports/CLDC11/src/java/lang/NullPointerException.java
+++ b/Ports/CLDC11/src/java/lang/NullPointerException.java
@@ -22,23 +22,17 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of a null object. Accessing or modifying the field of a null object. Taking the length of null as if it were an array. Accessing or modifying the slots of null as if it were an array. Throwing null as if it were a Throwable value.
- * Applications should throw instances of this class to indicate other illegal uses of the null object.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown when an application attempts to use null in a case where an object is required. These include: Calling the instance method of a null object. Accessing or modifying the field of a null object. Taking the length of null as if it were an array. Accessing or modifying the slots of null as if it were an array. Throwing null as if it were a Throwable value.
+/// Applications should throw instances of this class to indicate other illegal uses of the null object.
+/// Since: JDK1.0, CLDC 1.0
public class NullPointerException extends java.lang.RuntimeException{
- /**
- * Constructs a NullPointerException with no detail message.
- */
+ /// Constructs a NullPointerException with no detail message.
public NullPointerException(){
//TODO codavaj!!
}
- /**
- * Constructs a NullPointerException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a NullPointerException with the specified detail message.
+ /// s - the detail message.
public NullPointerException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Number.java b/Ports/CLDC11/src/java/lang/Number.java
index 9104fa5fe8..2c96b3a92a 100644
--- a/Ports/CLDC11/src/java/lang/Number.java
+++ b/Ports/CLDC11/src/java/lang/Number.java
@@ -22,10 +22,7 @@
*/
package java.lang;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public abstract class Number {
public abstract int intValue();
diff --git a/Ports/CLDC11/src/java/lang/NumberFormatException.java b/Ports/CLDC11/src/java/lang/NumberFormatException.java
index 3a6cc212a9..91321c6565 100644
--- a/Ports/CLDC11/src/java/lang/NumberFormatException.java
+++ b/Ports/CLDC11/src/java/lang/NumberFormatException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
- * Since: JDK1.0, CLDC 1.0 See Also:Integer.toString()
- */
+/// Thrown to indicate that the application has attempted to convert a string to one of the numeric types, but that the string does not have the appropriate format.
+/// Since: JDK1.0, CLDC 1.0 See Also:Integer.toString()
public class NumberFormatException extends java.lang.IllegalArgumentException{
- /**
- * Constructs a NumberFormatException with no detail message.
- */
+ /// Constructs a NumberFormatException with no detail message.
public NumberFormatException(){
//TODO codavaj!!
}
- /**
- * Constructs a NumberFormatException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a NumberFormatException with the specified detail message.
+ /// s - the detail message.
public NumberFormatException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Object.java b/Ports/CLDC11/src/java/lang/Object.java
index ab1ab26ca0..32317dd8ac 100644
--- a/Ports/CLDC11/src/java/lang/Object.java
+++ b/Ports/CLDC11/src/java/lang/Object.java
@@ -22,105 +22,85 @@
* have any questions.
*/
package java.lang;
-/**
- * Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
- * Since: JDK1.0, CLDC 1.0 See Also:Class
- */
+/// Class Object is the root of the class hierarchy. Every class has Object as a superclass. All objects, including arrays, implement the methods of this class.
+/// Since: JDK1.0, CLDC 1.0 See Also:Class
public class Object{
public Object(){
//TODO codavaj!!
}
- /**
- * Indicates whether some other object is "equal to" this one.
- * The equals method implements an equivalence relation: It is reflexive: for any reference value x, x.equals(x) should return true. It is symmetric: for any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. It is transitive: for any reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. It is consistent: for any reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the object is modified. For any non-null reference value x, x.equals(null) should return false.
- * The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).
- */
+ /// Indicates whether some other object is "equal to" this one.
+ /// The equals method implements an equivalence relation: It is reflexive: for any reference value x, x.equals(x) should return true. It is symmetric: for any reference values x and y, x.equals(y) should return true if and only if y.equals(x) returns true. It is transitive: for any reference values x, y, and z, if x.equals(y) returns true and y.equals(z) returns true, then x.equals(z) should return true. It is consistent: for any reference values x and y, multiple invocations of x.equals(y) consistently return true or consistently return false, provided no information used in equals comparisons on the object is modified. For any non-null reference value x, x.equals(null) should return false.
+ /// The equals method for class Object implements the most discriminating possible equivalence relation on objects; that is, for any reference values x and y, this method returns true if and only if x and y refer to the same object (x==y has the value true).
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class.
- */
+ /// Returns the runtime class of an object. That Class object is the object that is locked by static synchronized methods of the represented class.
public final java.lang.Class getClass(){
return null; //TODO codavaj!!
}
- /**
- * Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
- * The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.
- * As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
- */
+ /// Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
+ /// The general contract of hashCode is: Whenever it is invoked on the same object more than once during an execution of a Java application, the hashCode method must consistently return the same integer, provided no information used in equals comparisons on the object is modified. This integer need not remain consistent from one execution of an application to another execution of the same application. If two objects are equal according to the equals(Object) method, then calling the hashCode method on each of the two objects must produce the same integer result. It is not required that if two objects are unequal according to the equals(java.lang.Object) method, then calling the hashCode method on each of the two objects must produce distinct integer results. However, the programmer should be aware that producing distinct integer results for unequal objects may improve the performance of hashtables.
+ /// As much as is reasonably practical, the hashCode method defined by class Object does return distinct integers for distinct objects. (This is typically implemented by converting the internal address of the object into an integer, but this implementation technique is not required by the JavaTM programming language.)
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.
- * The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. The awakened thread will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object.
- * This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways: By executing a synchronized instance method of that object. By executing the body of a synchronized statement that synchronizes on the object. For objects of type Class, by executing a synchronized static method of that class.
- * Only one thread at a time can own an object's monitor.
- */
+ /// Wakes up a single thread that is waiting on this object's monitor. If any threads are waiting on this object, one of them is chosen to be awakened. The choice is arbitrary and occurs at the discretion of the implementation. A thread waits on an object's monitor by calling one of the wait methods.
+ /// The awakened thread will not be able to proceed until the current thread relinquishes the lock on this object. The awakened thread will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened thread enjoys no reliable privilege or disadvantage in being the next thread to lock this object.
+ /// This method should only be called by a thread that is the owner of this object's monitor. A thread becomes the owner of the object's monitor in one of three ways: By executing a synchronized instance method of that object. By executing the body of a synchronized statement that synchronizes on the object. For objects of type Class, by executing a synchronized static method of that class.
+ /// Only one thread at a time can own an object's monitor.
public final void notify(){
return; //TODO codavaj!!
}
- /**
- * Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.
- * The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.
- * This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
- */
+ /// Wakes up all threads that are waiting on this object's monitor. A thread waits on an object's monitor by calling one of the wait methods.
+ /// The awakened threads will not be able to proceed until the current thread relinquishes the lock on this object. The awakened threads will compete in the usual manner with any other threads that might be actively competing to synchronize on this object; for example, the awakened threads enjoy no reliable privilege or disadvantage in being the next thread to lock this object.
+ /// This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
public final void notifyAll(){
return; //TODO codavaj!!
}
- /**
- * Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
- * The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
- * getClass().getName() + '@' + Integer.toHexString(hashCode())
- */
+ /// Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method.
+ /// The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of:
+ /// getClass().getName() + '@' + Integer.toHexString(hashCode())
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Causes current thread to wait until another thread invokes the
- * method or the
- * method for this object. In other word's this method behaves exactly as if it simply performs the call wait(0).
- * The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The thread then waits until it can re-obtain ownership of the monitor and resumes execution.
- * This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
- */
+ /// Causes current thread to wait until another thread invokes the
+ /// method or the
+ /// method for this object. In other word's this method behaves exactly as if it simply performs the call wait(0).
+ /// The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The thread then waits until it can re-obtain ownership of the monitor and resumes execution.
+ /// This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
public final void wait() throws java.lang.InterruptedException{
return; //TODO codavaj!!
}
- /**
- * Causes current thread to wait until either another thread invokes the
- * method or the
- * method for this object, or a specified amount of time has elapsed.
- * The current thread must own this object's monitor.
- * This method causes the current thread (call it T) to place itself in the wait set for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens: Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened. Some other thread invokes the notifyAll method for this object. Some other thread interrupts thread T. The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.
- * The thread T is then removed from the wait set for this object and re-enabled for thread scheduling. It then competes in the usual manner with other threads for the right to synchronize on the object; once it has gained control of the object, all its synchronization claims on the object are restored to the status quo ante - that is, to the situation as of the time that the wait method was invoked. Thread T then returns from the invocation of the wait method. Thus, on return from the wait method, the synchronization state of the object and of thread T is exactly as it was when the wait method was invoked.
- * If the current thread is interrupted by another thread while it is waiting, then an InterruptedException is thrown. This exception is not thrown until the lock status of this object has been restored as described above.
- * Note that the wait method, as it places the current thread into the wait set for this object, unlocks only this object; any other objects on which the current thread may be synchronized remain locked while the thread waits.
- * This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
- */
+ /// Causes current thread to wait until either another thread invokes the
+ /// method or the
+ /// method for this object, or a specified amount of time has elapsed.
+ /// The current thread must own this object's monitor.
+ /// This method causes the current thread (call it T) to place itself in the wait set for this object and then to relinquish any and all synchronization claims on this object. Thread T becomes disabled for thread scheduling purposes and lies dormant until one of four things happens: Some other thread invokes the notify method for this object and thread T happens to be arbitrarily chosen as the thread to be awakened. Some other thread invokes the notifyAll method for this object. Some other thread interrupts thread T. The specified amount of real time has elapsed, more or less. If timeout is zero, however, then real time is not taken into consideration and the thread simply waits until notified.
+ /// The thread T is then removed from the wait set for this object and re-enabled for thread scheduling. It then competes in the usual manner with other threads for the right to synchronize on the object; once it has gained control of the object, all its synchronization claims on the object are restored to the status quo ante - that is, to the situation as of the time that the wait method was invoked. Thread T then returns from the invocation of the wait method. Thus, on return from the wait method, the synchronization state of the object and of thread T is exactly as it was when the wait method was invoked.
+ /// If the current thread is interrupted by another thread while it is waiting, then an InterruptedException is thrown. This exception is not thrown until the lock status of this object has been restored as described above.
+ /// Note that the wait method, as it places the current thread into the wait set for this object, unlocks only this object; any other objects on which the current thread may be synchronized remain locked while the thread waits.
+ /// This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
public final void wait(long timeout) throws java.lang.InterruptedException{
return; //TODO codavaj!!
}
- /**
- * Causes current thread to wait until another thread invokes the
- * method or the
- * method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
- * This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by:
- * 1000000*timeout+nanos
- * In all other respects, this method does the same thing as the method wait(long) of one argument. In particular, wait(0, 0) means the same thing as wait(0).
- * The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred: Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The timeout period, specified by timeout milliseconds plus nanos nanoseconds arguments, has elapsed.
- * The thread then waits until it can re-obtain ownership of the monitor and resumes execution
- * This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
- */
+ /// Causes current thread to wait until another thread invokes the
+ /// method or the
+ /// method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
+ /// This method is similar to the wait method of one argument, but it allows finer control over the amount of time to wait for a notification before giving up. The amount of real time, measured in nanoseconds, is given by:
+ /// 1000000*timeout+nanos
+ /// In all other respects, this method does the same thing as the method wait(long) of one argument. In particular, wait(0, 0) means the same thing as wait(0).
+ /// The current thread must own this object's monitor. The thread releases ownership of this monitor and waits until either of the following two conditions has occurred: Another thread notifies threads waiting on this object's monitor to wake up either through a call to the notify method or the notifyAll method. The timeout period, specified by timeout milliseconds plus nanos nanoseconds arguments, has elapsed.
+ /// The thread then waits until it can re-obtain ownership of the monitor and resumes execution
+ /// This method should only be called by a thread that is the owner of this object's monitor. See the notify method for a description of the ways in which a thread can become the owner of a monitor.
public final void wait(long timeout, int nanos) throws java.lang.InterruptedException{
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/OutOfMemoryError.java b/Ports/CLDC11/src/java/lang/OutOfMemoryError.java
index a8195bb71b..f480365981 100644
--- a/Ports/CLDC11/src/java/lang/OutOfMemoryError.java
+++ b/Ports/CLDC11/src/java/lang/OutOfMemoryError.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown when the Java Virtual Machine cannot allocate an object because it is out of memory, and no more memory could be made available by the garbage collector.
+/// Since: JDK1.0, CLDC 1.0
public class OutOfMemoryError extends java.lang.VirtualMachineError{
- /**
- * Constructs an OutOfMemoryError with no detail message.
- */
+ /// Constructs an OutOfMemoryError with no detail message.
public OutOfMemoryError(){
//TODO codavaj!!
}
- /**
- * Constructs an OutOfMemoryError with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs an OutOfMemoryError with the specified detail message.
+ /// s - the detail message.
public OutOfMemoryError(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Override.java b/Ports/CLDC11/src/java/lang/Override.java
index 1d92a0d38a..af04f6f6d9 100644
--- a/Ports/CLDC11/src/java/lang/Override.java
+++ b/Ports/CLDC11/src/java/lang/Override.java
@@ -21,15 +21,13 @@
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
-/**
- *
- * An annotation to indicate that a method is intended to override a superclass
- * method. This provides a compile-time assertion that a method actually
- * overrides the superclass method.
- *
- *
- * @since 1.5
- */
+/// An annotation to indicate that a method is intended to override a superclass
+/// method. This provides a compile-time assertion that a method actually
+/// overrides the superclass method.
+///
+/// #### Since
+///
+/// 1.5
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.SOURCE)
public @interface Override {
diff --git a/Ports/CLDC11/src/java/lang/Record.java b/Ports/CLDC11/src/java/lang/Record.java
index d870566c2b..811a88b225 100644
--- a/Ports/CLDC11/src/java/lang/Record.java
+++ b/Ports/CLDC11/src/java/lang/Record.java
@@ -22,9 +22,7 @@
*/
package java.lang;
-/**
- * Base class for Java record types.
- */
+/// Base class for Java record types.
public abstract class Record {
protected Record() {
}
diff --git a/Ports/CLDC11/src/java/lang/Runnable.java b/Ports/CLDC11/src/java/lang/Runnable.java
index 85b8e4d769..2a00345ebc 100644
--- a/Ports/CLDC11/src/java/lang/Runnable.java
+++ b/Ports/CLDC11/src/java/lang/Runnable.java
@@ -22,17 +22,13 @@
* have any questions.
*/
package java.lang;
-/**
- * The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run.
- * This interface is designed to provide a common protocol for objects that wish to execute code while they are active. For example, Runnable is implemented by class Thread. Being active simply means that a thread has been started and has not yet been stopped.
- * In addition, Runnable provides the means for a class to be active while not subclassing Thread. A class that implements Runnable can run without subclassing Thread by instantiating a Thread instance and passing itself in as the target. In most cases, the Runnable interface should be used if you are only planning to override the run() method and no other Thread methods. This is important because classes should not be subclassed unless the programmer intends on modifying or enhancing the fundamental behavior of the class.
- * Since: JDK1.0, CLDC 1.0 See Also:Thread
- */
+/// The Runnable interface should be implemented by any class whose instances are intended to be executed by a thread. The class must define a method of no arguments called run.
+/// This interface is designed to provide a common protocol for objects that wish to execute code while they are active. For example, Runnable is implemented by class Thread. Being active simply means that a thread has been started and has not yet been stopped.
+/// In addition, Runnable provides the means for a class to be active while not subclassing Thread. A class that implements Runnable can run without subclassing Thread by instantiating a Thread instance and passing itself in as the target. In most cases, the Runnable interface should be used if you are only planning to override the run() method and no other Thread methods. This is important because classes should not be subclassed unless the programmer intends on modifying or enhancing the fundamental behavior of the class.
+/// Since: JDK1.0, CLDC 1.0 See Also:Thread
public interface Runnable{
- /**
- * When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
- * The general contract of the method run is that it may take any action whatsoever.
- */
+ /// When an object implementing interface Runnable is used to create a thread, starting the thread causes the object's run method to be called in that separately executing thread.
+ /// The general contract of the method run is that it may take any action whatsoever.
public abstract void run();
}
diff --git a/Ports/CLDC11/src/java/lang/Runtime.java b/Ports/CLDC11/src/java/lang/Runtime.java
index 90d733b758..9f9571703d 100644
--- a/Ports/CLDC11/src/java/lang/Runtime.java
+++ b/Ports/CLDC11/src/java/lang/Runtime.java
@@ -22,47 +22,35 @@
* have any questions.
*/
package java.lang;
-/**
- * Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method.
- * An application cannot create its own instance of this class.
- * Since: JDK1.0, CLDC 1.0 See Also:getRuntime()
- */
+/// Every Java application has a single instance of class Runtime that allows the application to interface with the environment in which the application is running. The current runtime can be obtained from the getRuntime method.
+/// An application cannot create its own instance of this class.
+/// Since: JDK1.0, CLDC 1.0 See Also:getRuntime()
public class Runtime{
- /**
- * Terminates the currently running Java application. This method never returns normally.
- * The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
- */
+ /// Terminates the currently running Java application. This method never returns normally.
+ /// The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
public void exit(int status){
return; //TODO codavaj!!
}
- /**
- * Returns the amount of free memory in the system. Calling the gc method may result in increasing the value returned by freeMemory.
- */
+ /// Returns the amount of free memory in the system. Calling the gc method may result in increasing the value returned by freeMemory.
public long freeMemory(){
return 0l; //TODO codavaj!!
}
- /**
- * Runs the garbage collector. Calling this method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made its best effort to recycle all discarded objects.
- * The name gc stands for "garbage collector". The Java Virtual Machine performs this recycling process automatically as needed even if the gc method is not invoked explicitly.
- * The method System.gc() is the conventional and convenient means of invoking this method.
- */
+ /// Runs the garbage collector. Calling this method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made its best effort to recycle all discarded objects.
+ /// The name gc stands for "garbage collector". The Java Virtual Machine performs this recycling process automatically as needed even if the gc method is not invoked explicitly.
+ /// The method System.gc() is the conventional and convenient means of invoking this method.
public void gc(){
return; //TODO codavaj!!
}
- /**
- * Returns the runtime object associated with the current Java application. Most of the methods of class Runtime are instance methods and must be invoked with respect to the current runtime object.
- */
+ /// Returns the runtime object associated with the current Java application. Most of the methods of class Runtime are instance methods and must be invoked with respect to the current runtime object.
public static java.lang.Runtime getRuntime(){
return null; //TODO codavaj!!
}
- /**
- * Returns the total amount of memory in the Java Virtual Machine. The value returned by this method may vary over time, depending on the host environment.
- * Note that the amount of memory required to hold an object of any given type may be implementation-dependent.
- */
+ /// Returns the total amount of memory in the Java Virtual Machine. The value returned by this method may vary over time, depending on the host environment.
+ /// Note that the amount of memory required to hold an object of any given type may be implementation-dependent.
public long totalMemory(){
return 0l; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/RuntimeException.java b/Ports/CLDC11/src/java/lang/RuntimeException.java
index a2c5b1f67e..8afd70d146 100644
--- a/Ports/CLDC11/src/java/lang/RuntimeException.java
+++ b/Ports/CLDC11/src/java/lang/RuntimeException.java
@@ -22,40 +22,33 @@
* have any questions.
*/
package java.lang;
-/**
- * RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
- * A method is not required to declare in its throws clause any subclasses of RuntimeException that might be thrown during the execution of the method but not caught.
- * Since: JDK1.0, CLDC 1.0
- */
+/// RuntimeException is the superclass of those exceptions that can be thrown during the normal operation of the Java Virtual Machine.
+/// A method is not required to declare in its throws clause any subclasses of RuntimeException that might be thrown during the execution of the method but not caught.
+/// Since: JDK1.0, CLDC 1.0
public class RuntimeException extends java.lang.Exception{
- /**
- * Constructs a RuntimeException with no detail message.
- */
+ /// Constructs a RuntimeException with no detail message.
public RuntimeException(){
//TODO codavaj!!
}
- /**
- * Constructs a RuntimeException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a RuntimeException with the specified detail message.
+ /// s - the detail message.
public RuntimeException(java.lang.String s){
//TODO codavaj!!
}
- /**
- * Constructs a RuntimeException with specified cause.
- * @param cause The cause of the exception.
- */
+ /// Constructs a RuntimeException with specified cause.
+ ///
+ /// #### Parameters
+ ///
+ /// - `cause`: The cause of the exception.
public RuntimeException(Throwable cause) {
//TODO codavaj!!
}
- /**
- * Constructs a RuntimeException with the specified detail message and cause.
- * s - the detail message.
- * cause The cause of the exception.
- */
+ /// Constructs a RuntimeException with the specified detail message and cause.
+ /// s - the detail message.
+ /// cause The cause of the exception.
public RuntimeException(java.lang.String s, Throwable cause) {
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/SecurityException.java b/Ports/CLDC11/src/java/lang/SecurityException.java
index 287b89c3a5..f766217c73 100644
--- a/Ports/CLDC11/src/java/lang/SecurityException.java
+++ b/Ports/CLDC11/src/java/lang/SecurityException.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown by the system to indicate a security violation.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown by the system to indicate a security violation.
+/// Since: JDK1.0, CLDC 1.0
public class SecurityException extends java.lang.RuntimeException{
- /**
- * Constructs a SecurityException with no detail message.
- */
+ /// Constructs a SecurityException with no detail message.
public SecurityException(){
//TODO codavaj!!
}
- /**
- * Constructs a SecurityException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a SecurityException with the specified detail message.
+ /// s - the detail message.
public SecurityException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Short.java b/Ports/CLDC11/src/java/lang/Short.java
index 0e1eb02c2e..d2fd8c381a 100644
--- a/Ports/CLDC11/src/java/lang/Short.java
+++ b/Ports/CLDC11/src/java/lang/Short.java
@@ -22,78 +22,62 @@
* have any questions.
*/
package java.lang;
-/**
- * The Short class is the standard wrapper for short values.
- * Since: JDK1.1, CLDC 1.0
- */
+/// The Short class is the standard wrapper for short values.
+/// Since: JDK1.1, CLDC 1.0
public final class Short extends Number implements Comparable {
- /**
- * The maximum value a Short can have.
- * See Also:Constant Field Values
- */
+ /// The maximum value a Short can have.
+ /// See Also:Constant Field Values
public static final short MAX_VALUE=32767;
- /**
- * The minimum value a Short can have.
- * See Also:Constant Field Values
- */
+ /// The minimum value a Short can have.
+ /// See Also:Constant Field Values
public static final short MIN_VALUE=-32768;
- /**
- * Constructs a Short object initialized to the specified short value.
- * value - the initial value of the Short
- */
+ /// Constructs a Short object initialized to the specified short value.
+ /// value - the initial value of the Short
public Short(short value){
//TODO codavaj!!
}
- /**
- * Compares this object to the specified object.
- */
+ /// Compares this object to the specified object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this Short.
- */
+ /// Returns a hashcode for this Short.
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short. The radix is assumed to be 10.
- */
+ /// Assuming the specified String represents a short, returns that short's value. Throws an exception if the String cannot be parsed as a short. The radix is assumed to be 10.
public static short parseShort(java.lang.String s) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Assuming the specified String represents a short, returns that short's value in the radix specified by the second argument. Throws an exception if the String cannot be parsed as a short.
- */
+ /// Assuming the specified String represents a short, returns that short's value in the radix specified by the second argument. Throws an exception if the String cannot be parsed as a short.
public static short parseShort(java.lang.String s, int radix) throws java.lang.NumberFormatException{
return 0; //TODO codavaj!!
}
- /**
- * Returns the value of this Short as a short.
- */
+ /// Returns the value of this Short as a short.
public short shortValue(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a String object representing this Short's value.
- */
+ /// Returns a String object representing this Short's value.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Returns the object instance of i
- * @param i the primitive
- * @return object instance
- */
+ /// Returns the object instance of i
+ ///
+ /// #### Parameters
+ ///
+ /// - `i`: the primitive
+ ///
+ /// #### Returns
+ ///
+ /// object instance
public static Short valueOf(short i) {
return null;
}
diff --git a/Ports/CLDC11/src/java/lang/StackTraceElement.java b/Ports/CLDC11/src/java/lang/StackTraceElement.java
index 7235667d94..3cbe8df948 100644
--- a/Ports/CLDC11/src/java/lang/StackTraceElement.java
+++ b/Ports/CLDC11/src/java/lang/StackTraceElement.java
@@ -22,10 +22,7 @@
*/
package java.lang;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public class StackTraceElement {
private String declaringClass;
private String methodName;
diff --git a/Ports/CLDC11/src/java/lang/String.java b/Ports/CLDC11/src/java/lang/String.java
index a2cbfb89d1..994908742a 100644
--- a/Ports/CLDC11/src/java/lang/String.java
+++ b/Ports/CLDC11/src/java/lang/String.java
@@ -26,15 +26,13 @@
import java.nio.charset.Charset;
import java.util.Comparator;
-/**
- * The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class.
- * Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:
- * is equivalent to:
- * Here are some more examples of how strings can be used:
- * The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase.
- * The Java language provides special support for the string concatenation operator (+), and for conversion of other objects to strings. String concatenation is implemented through the StringBuffer class and its append method. String conversions are implemented through the method toString, defined by Object and inherited by all classes in Java. For additional information on string concatenation and conversion, see Gosling, Joy, and Steele, The Java Language Specification.
- * Since: JDK1.0, CLDC 1.0 See Also:Object.toString(), StringBuffer, StringBuffer.append(boolean), StringBuffer.append(char), StringBuffer.append(char[]), StringBuffer.append(char[], int, int), StringBuffer.append(int), StringBuffer.append(long), StringBuffer.append(java.lang.Object), StringBuffer.append(java.lang.String)
- */
+/// The String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class.
+/// Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:
+/// is equivalent to:
+/// Here are some more examples of how strings can be used:
+/// The class String includes methods for examining individual characters of the sequence, for comparing strings, for searching strings, for extracting substrings, and for creating a copy of a string with all characters translated to uppercase or to lowercase.
+/// The Java language provides special support for the string concatenation operator (+), and for conversion of other objects to strings. String concatenation is implemented through the StringBuffer class and its append method. String conversions are implemented through the method toString, defined by Object and inherited by all classes in Java. For additional information on string concatenation and conversion, see Gosling, Joy, and Steele, The Java Language Specification.
+/// Since: JDK1.0, CLDC 1.0 See Also:Object.toString(), StringBuffer, StringBuffer.append(boolean), StringBuffer.append(char), StringBuffer.append(char[]), StringBuffer.append(char[], int, int), StringBuffer.append(int), StringBuffer.append(long), StringBuffer.append(java.lang.Object), StringBuffer.append(java.lang.String)
public final class String implements CharSequence, Comparable {
public static final Comparator CASE_INSENSITIVE_ORDER = new Comparator() {
@@ -42,93 +40,76 @@ public int compare(String o1, String o2){
return o1.compareToIgnoreCase(o2);
}
};
- /**
- * Initializes a newly created String object so that it represents an empty character sequence.
- */
+ /// Initializes a newly created String object so that it represents an empty character sequence.
public String(){
//TODO codavaj!!
}
- /**
- * Construct a new String by converting the specified array of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
- * bytes - The bytes to be converted into characters
- * JDK1.1
- */
+ /// Construct a new String by converting the specified array of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
+ /// bytes - The bytes to be converted into characters
+ /// JDK1.1
public String(byte[] bytes){
//TODO codavaj!!
}
- /**
- * Construct a new String by converting the specified subarray of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
- * bytes - The bytes to be converted into charactersoff - Index of the first byte to convertlen - Number of bytes to convert
- * JDK1.1
- */
+ /// Construct a new String by converting the specified subarray of bytes using the platform's default character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
+ /// bytes - The bytes to be converted into charactersoff - Index of the first byte to convertlen - Number of bytes to convert
+ /// JDK1.1
public String(byte[] bytes, int off, int len){
//TODO codavaj!!
}
- /**
- * Construct a new String by converting the specified subarray of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
- * bytes - The bytes to be converted into charactersoff - Index of the first byte to convertlen - Number of bytes to convertenc - The name of a character encoding
- * - If the named encoding is not supported
- * JDK1.1
- */
+ /// Construct a new String by converting the specified subarray of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the subarray.
+ /// bytes - The bytes to be converted into charactersoff - Index of the first byte to convertlen - Number of bytes to convertenc - The name of a character encoding
+ /// - If the named encoding is not supported
+ /// JDK1.1
public String(byte[] bytes, int off, int len, java.lang.String enc) throws java.io.UnsupportedEncodingException{
//TODO codavaj!!
}
- /**
- * Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
- * bytes - The bytes to be converted into charactersenc - The name of a supported character encoding
- * - If the named encoding is not supported
- * @since 8.0
- */
+ /// Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
+ /// bytes - The bytes to be converted into charactersenc - The name of a supported character encoding
+ /// - If the named encoding is not supported
+ ///
+ /// #### Since
+ ///
+ /// 8.0
public String(byte[] bytes, java.nio.charset.Charset charset) throws java.io.UnsupportedEncodingException {
this(bytes, 0, bytes.length, charset.displayName());
}
- /**
- * Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
- * bytes - The bytes to be converted into charactersenc - The name of a supported character encoding
- * - If the named encoding is not supported
- * JDK1.1
- */
+ /// Construct a new String by converting the specified array of bytes using the specified character encoding. The length of the new String is a function of the encoding, and hence may not be equal to the length of the byte array.
+ /// bytes - The bytes to be converted into charactersenc - The name of a supported character encoding
+ /// - If the named encoding is not supported
+ /// JDK1.1
public String(byte[] bytes, java.lang.String enc) throws java.io.UnsupportedEncodingException{
//TODO codavaj!!
}
- /**
- * Allocates a new String so that it represents the sequence of characters currently contained in the character array argument. The contents of the character array are copied; subsequent modification of the character array does not affect the newly created string.
- * value - the initial value of the string.
- * - if value is null.
- */
+ /// Allocates a new String so that it represents the sequence of characters currently contained in the character array argument. The contents of the character array are copied; subsequent modification of the character array does not affect the newly created string.
+ /// value - the initial value of the string.
+ /// - if value is null.
public String(char[] value){
//TODO codavaj!!
}
- /**
- * Allocates a new String that contains characters from a subarray of the character array argument. The offset argument is the index of the first character of the subarray and the count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.
- * value - array that is the source of characters.offset - the initial offset.count - the length.
- * - if the offset and count arguments index characters outside the bounds of the value array.
- * - if value is null.
- */
+ /// Allocates a new String that contains characters from a subarray of the character array argument. The offset argument is the index of the first character of the subarray and the count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.
+ /// value - array that is the source of characters.offset - the initial offset.count - the length.
+ /// - if the offset and count arguments index characters outside the bounds of the value array.
+ /// - if value is null.
public String(char[] value, int offset, int count){
//TODO codavaj!!
}
- /**
- * Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
- * value - a String.
- */
+ /// Initializes a newly created String object so that it represents the same sequence of characters as the argument; in other words, the newly created string is a copy of the argument string.
+ /// value - a String.
public String(java.lang.String value){
//TODO codavaj!!
}
- /**
- * Allocates a new string that contains the sequence of characters currently contained in the string buffer argument. The contents of the string buffer are copied; subsequent modification of the string buffer does not affect the newly created string.
- * buffer - a StringBuffer.
- * - If buffer is null.
- */
+ /// Allocates a new string that contains the sequence of characters currently contained in the string buffer argument. The contents of the string buffer are copied; subsequent modification of the string buffer does not affect the newly created string.
+ /// buffer - a StringBuffer.
+ /// - If buffer is null.
public String(java.lang.StringBuffer buffer){
//TODO codavaj!!
}
@@ -137,19 +118,15 @@ public String(java.lang.StringBuilder buffer) {
//TODO codavaj!!
}
- /**
- * Returns the character at the specified index. An index ranges from 0 to length() - 1. The first character of the sequence is at index 0, the next at index 1, and so on, as for array indexing.
- */
+ /// Returns the character at the specified index. An index ranges from 0 to length() - 1. The first character of the sequence is at index 0, the next at index 1, and so on, as for array indexing.
public char charAt(int index){
return ' '; //TODO codavaj!!
}
- /**
- * Compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string. The result is a negative integer if this String object lexicographically precedes the argument string. The result is a positive integer if this String object lexicographically follows the argument string. The result is zero if the strings are equal; compareTo returns 0 exactly when the
- * method would return true.
- * This is the definition of lexicographic ordering. If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both. If they have different characters at one or more index positions, let k be the smallest such index; then the string whose character at position k has the smaller value, as determined by using the < operator, lexicographically precedes the other string. In this case, compareTo returns the difference of the two character values at position k in the two string -- that is, the value:
- * this.charAt(k)-anotherString.charAt(k) If there is no index position at which they differ, then the shorter string lexicographically precedes the longer string. In this case, compareTo returns the difference of the lengths of the strings -- that is, the value: this.length()-anotherString.length()
- */
+ /// Compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings. The character sequence represented by this String object is compared lexicographically to the character sequence represented by the argument string. The result is a negative integer if this String object lexicographically precedes the argument string. The result is a positive integer if this String object lexicographically follows the argument string. The result is zero if the strings are equal; compareTo returns 0 exactly when the
+ /// method would return true.
+ /// This is the definition of lexicographic ordering. If two strings are different, then either they have different characters at some index that is a valid index for both strings, or their lengths are different, or both. If they have different characters at one or more index positions, let k be the smallest such index; then the string whose character at position k has the smaller value, as determined by using the < operator, lexicographically precedes the other string. In this case, compareTo returns the difference of the two character values at position k in the two string -- that is, the value:
+ /// this.charAt(k)-anotherString.charAt(k) If there is no index position at which they differ, then the shorter string lexicographically precedes the longer string. In this case, compareTo returns the difference of the lengths of the strings -- that is, the value: this.length()-anotherString.length()
public int compareTo(java.lang.String anotherString){
return 0; //TODO codavaj!!
}
@@ -174,176 +151,152 @@ public static String copyValueOf(char[] data, int offset, int count) {
return null;
}
- /**
- * Concatenates the specified string to the end of this string.
- * If the length of the argument string is 0, then this String object is returned. Otherwise, a new String object is created, representing a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string.
- * Examples:
- * "cares".concat("s") returns "caress" "to".concat("get").concat("her") returns "together"
- */
+ /// Concatenates the specified string to the end of this string.
+ /// If the length of the argument string is 0, then this String object is returned. Otherwise, a new String object is created, representing a character sequence that is the concatenation of the character sequence represented by this String object and the character sequence represented by the argument string.
+ /// Examples:
+ /// "cares".concat("s") returns "caress" "to".concat("get").concat("her") returns "together"
public java.lang.String concat(java.lang.String str){
return null; //TODO codavaj!!
}
- /**
- * Tests if this string ends with the specified suffix.
- */
+ /// Tests if this string ends with the specified suffix.
public boolean endsWith(java.lang.String suffix){
return false; //TODO codavaj!!
}
- /**
- * Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
- */
+ /// Compares this string to the specified object. The result is true if and only if the argument is not null and is a String object that represents the same sequence of characters as this object.
public boolean equals(java.lang.Object anObject){
return false; //TODO codavaj!!
}
- /**
- * Compares this String to another String, ignoring case considerations. Two strings are considered equal ignoring case if they are of the same length, and corresponding characters in the two strings are equal ignoring case.
- * Two characters c1 and c2 are considered the same, ignoring case if at least one of the following is true: The two characters are the same (as compared by the == operator). Applying the method Character.toUpperCase(char) to each character produces the same result. Applying the method Character.toLowerCase(char) to each character produces the same result.
- */
+ /// Compares this String to another String, ignoring case considerations. Two strings are considered equal ignoring case if they are of the same length, and corresponding characters in the two strings are equal ignoring case.
+ /// Two characters c1 and c2 are considered the same, ignoring case if at least one of the following is true: The two characters are the same (as compared by the == operator). Applying the method Character.toUpperCase(char) to each character produces the same result. Applying the method Character.toLowerCase(char) to each character produces the same result.
public boolean equalsIgnoreCase(java.lang.String anotherString){
return false; //TODO codavaj!!
}
- /**
- * Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
- */
+ /// Convert this String into bytes according to the platform's default character encoding, storing the result into a new byte array.
public byte[] getBytes(){
return null; //TODO codavaj!!
}
- /**
- * Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
- */
+ /// Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
public byte[] getBytes(java.lang.String enc) throws java.io.UnsupportedEncodingException{
return null; //TODO codavaj!!
}
- /**
- * Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
- */
+ /// Convert this String into bytes according to the specified character encoding, storing the result into a new byte array.
public byte[] getBytes(Charset charset) throws java.io.UnsupportedEncodingException {
return getBytes(charset.displayName());
}
- /**
- * Copies characters from this string into the destination character array.
- * The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1 (thus the total number of characters to be copied is srcEnd-srcBegin). The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
- * dstbegin + (srcEnd-srcBegin) - 1
- */
+ /// Copies characters from this string into the destination character array.
+ /// The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1 (thus the total number of characters to be copied is srcEnd-srcBegin). The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
+ /// dstbegin + (srcEnd-srcBegin) - 1
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin){
return; //TODO codavaj!!
}
- /**
- * Returns a hashcode for this string. The hashcode for a String object is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using int arithmetic, where s[i] is the
- * th character of the string, n is the length of the string, and ^ indicates exponentiation. (The hash value of the empty string is zero.)
- */
+ /// Returns a hashcode for this string. The hashcode for a String object is computed as s[0]*31^(n-1) + s[1]*31^(n-2) + ... + s[n-1] using int arithmetic, where s[i] is the
+ /// th character of the string, n is the length of the string, and ^ indicates exponentiation. (The hash value of the empty string is zero.)
public int hashCode(){
return 0; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index of the first such occurrence is returned -- that is, the smallest value
- * such that: this.charAt(
- * ) == ch is true. If no such character occurs in this string, then -1 is returned.
- */
+ /// Returns the index within this string of the first occurrence of the specified character. If a character with value ch occurs in the character sequence represented by this String object, then the index of the first such occurrence is returned -- that is, the smallest value
+ /// such that: this.charAt(
+ /// ) == ch is true. If no such character occurs in this string, then -1 is returned.
public int indexOf(int ch){
return 0; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
- * If a character with value ch occurs in the character sequence represented by this String object at an index no smaller than fromIndex, then the index of the first such occurrence is returned--that is, the smallest value k such that:
- * (this.charAt(
- * ) == ch) && (
- * >= fromIndex) is true. If no such character occurs in this string at or after position fromIndex, then -1 is returned.
- * There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.
- */
+ /// Returns the index within this string of the first occurrence of the specified character, starting the search at the specified index.
+ /// If a character with value ch occurs in the character sequence represented by this String object at an index no smaller than fromIndex, then the index of the first such occurrence is returned--that is, the smallest value k such that:
+ /// (this.charAt(
+ /// ) == ch) && (
+ /// >= fromIndex) is true. If no such character occurs in this string at or after position fromIndex, then -1 is returned.
+ /// There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.
public int indexOf(int ch, int fromIndex){
return 0; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value
- * such that: this.startsWith(str,
- * ) is true.
- */
+ /// Returns the index within this string of the first occurrence of the specified substring. The integer returned is the smallest value
+ /// such that: this.startsWith(str,
+ /// ) is true.
public int indexOf(java.lang.String str){
return 0; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. The integer returned is the smallest value
- * such that: this.startsWith(str,
- * ) && (
- * >= fromIndex) is true.
- * There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.
- */
+ /// Returns the index within this string of the first occurrence of the specified substring, starting at the specified index. The integer returned is the smallest value
+ /// such that: this.startsWith(str,
+ /// ) && (
+ /// >= fromIndex) is true.
+ /// There is no restriction on the value of fromIndex. If it is negative, it has the same effect as if it were zero: this entire string may be searched. If it is greater than the length of this string, it has the same effect as if it were equal to the length of this string: -1 is returned.
public int indexOf(java.lang.String str, int fromIndex){
return 0; //TODO codavaj!!
}
- /**
- * Returns a canonical representation for the string object.
- * A pool of strings, initially empty, is maintained privately by the class String.
- * When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.
- * It follows that for any two strings s and t, s.intern()==t.intern() is true if and only if s.equals(t) is true.
- * All literal strings and string-valued constant expressions are interned. String literals are defined in Section 3.10.5 of the Java Language Specification
- */
+ /// Returns a canonical representation for the string object.
+ /// A pool of strings, initially empty, is maintained privately by the class String.
+ /// When the intern method is invoked, if the pool already contains a string equal to this String object as determined by the equals(Object) method, then the string from the pool is returned. Otherwise, this String object is added to the pool and a reference to this String object is returned.
+ /// It follows that for any two strings s and t, s.intern()==t.intern() is true if and only if s.equals(t) is true.
+ /// All literal strings and string-valued constant expressions are interned. String literals are defined in Section 3.10.5 of the Java Language Specification
public java.lang.String intern(){
return null; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the last occurrence of the specified character. That is, the index returned is the largest value
- * such that: this.charAt(
- * ) == ch is true. The String is searched backwards starting at the last character.
- */
+ /// Returns the index within this string of the last occurrence of the specified character. That is, the index returned is the largest value
+ /// such that: this.charAt(
+ /// ) == ch is true. The String is searched backwards starting at the last character.
public int lastIndexOf(int ch){
return 0; //TODO codavaj!!
}
- /**
- * Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. That is, the index returned is the largest value
- * such that: (this.charAt(k) == ch) && (k <= fromIndex) is true.
- */
+ /// Returns the index within this string of the last occurrence of the specified character, searching backward starting at the specified index. That is, the index returned is the largest value
+ /// such that: (this.charAt(k) == ch) && (k <= fromIndex) is true.
public int lastIndexOf(int ch, int fromIndex){
return 0; //TODO codavaj!!
}
- /**
- * Searches in this string for the last index of the specified string. The
- * search for the string starts at the end and moves towards the beginning
- * of this string.
- *
- * @param string
- * the string to find.
- * @return the index of the first character of the specified string in this
- * string, -1 if the specified string is not a substring.
- * @throws NullPointerException
- * if {@code string} is {@code null}.
- */
+ /// Searches in this string for the last index of the specified string. The
+ /// search for the string starts at the end and moves towards the beginning
+ /// of this string.
+ ///
+ /// #### Parameters
+ ///
+ /// - `string`: the string to find.
+ ///
+ /// #### Returns
+ ///
+ /// @return the index of the first character of the specified string in this
+ /// string, -1 if the specified string is not a substring.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `string` is `null`.
public int lastIndexOf(String string) {
// Use count instead of count - 1 so lastIndexOf("") answers count
return lastIndexOf(string, length());
}
- /**
- * Searches in this string for the index of the specified string. The search
- * for the string starts at the specified offset and moves towards the
- * beginning of this string.
- *
- * @param subString
- * the string to find.
- * @param start
- * the starting offset.
- * @return the index of the first character of the specified string in this
- * string , -1 if the specified string is not a substring.
- * @throws NullPointerException
- * if {@code subString} is {@code null}.
- */
+ /// Searches in this string for the index of the specified string. The search
+ /// for the string starts at the specified offset and moves towards the
+ /// beginning of this string.
+ ///
+ /// #### Parameters
+ ///
+ /// - `subString`: the string to find.
+ ///
+ /// - `start`: the starting offset.
+ ///
+ /// #### Returns
+ ///
+ /// @return the index of the first character of the specified string in this
+ /// string , -1 if the specified string is not a substring.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `subString` is `null`.
public int lastIndexOf(String subString, int start) {
int count = length();
int subCount = subString.length();
@@ -378,89 +331,67 @@ public int lastIndexOf(String subString, int start) {
}
- /**
- * Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.
- */
+ /// Returns the length of this string. The length is equal to the number of 16-bit Unicode characters in the string.
public int length(){
return 0; //TODO codavaj!!
}
- /**
- * Tests if two string regions are equal.
- * A substring of this String object is compared to a substring of the argument other. The result is true if these substrings represent character sequences that are the same, ignoring case if and only if ignoreCase is true. The substring of this String object to be compared begins at index toffset and has length len. The substring of other to be compared begins at index ooffset and has length len. The result is false if and only if at least one of the following is true: toffset is negative. ooffset is negative. toffset+len is greater than the length of this String object. ooffset+len is greater than the length of the other argument. There is some nonnegative integer k less than len such that:
- * this.charAt(toffset+k) != other.charAt(ooffset+k) ignoreCase is true and there is some nonnegative integer
- * less than len such that: Character.toLowerCase(this.charAt(toffset+k)) != Character.toLowerCase(other.charAt(ooffset+k)) and: Character.toUpperCase(this.charAt(toffset+k)) != Character.toUpperCase(other.charAt(ooffset+k))
- */
+ /// Tests if two string regions are equal.
+ /// A substring of this String object is compared to a substring of the argument other. The result is true if these substrings represent character sequences that are the same, ignoring case if and only if ignoreCase is true. The substring of this String object to be compared begins at index toffset and has length len. The substring of other to be compared begins at index ooffset and has length len. The result is false if and only if at least one of the following is true: toffset is negative. ooffset is negative. toffset+len is greater than the length of this String object. ooffset+len is greater than the length of the other argument. There is some nonnegative integer k less than len such that:
+ /// this.charAt(toffset+k) != other.charAt(ooffset+k) ignoreCase is true and there is some nonnegative integer
+ /// less than len such that: Character.toLowerCase(this.charAt(toffset+k)) != Character.toLowerCase(other.charAt(ooffset+k)) and: Character.toUpperCase(this.charAt(toffset+k)) != Character.toUpperCase(other.charAt(ooffset+k))
public boolean regionMatches(boolean ignoreCase, int toffset, java.lang.String other, int ooffset, int len){
return false; //TODO codavaj!!
}
- /**
- * Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
- * If the character oldChar does not occur in the character sequence represented by this String object, then a reference to this String object is returned. Otherwise, a new String object is created that represents a character sequence identical to the character sequence represented by this String object, except that every occurrence of oldChar is replaced by an occurrence of newChar.
- * Examples:
- * "mesquite in your cellar".replace('e', 'o') returns "mosquito in your collar" "the war of baronets".replace('r', 'y') returns "the way of bayonets" "sparring with a purple porpoise".replace('p', 't') returns "starring with a turtle tortoise" "JonL".replace('q', 'x') returns "JonL" (no change)
- */
+ /// Returns a new string resulting from replacing all occurrences of oldChar in this string with newChar.
+ /// If the character oldChar does not occur in the character sequence represented by this String object, then a reference to this String object is returned. Otherwise, a new String object is created that represents a character sequence identical to the character sequence represented by this String object, except that every occurrence of oldChar is replaced by an occurrence of newChar.
+ /// Examples:
+ /// "mesquite in your cellar".replace('e', 'o') returns "mosquito in your collar" "the war of baronets".replace('r', 'y') returns "the way of bayonets" "sparring with a purple porpoise".replace('p', 't') returns "starring with a turtle tortoise" "JonL".replace('q', 'x') returns "JonL" (no change)
public java.lang.String replace(char oldChar, char newChar){
return null; //TODO codavaj!!
}
- /**
- * Tests if this string starts with the specified prefix.
- */
+ /// Tests if this string starts with the specified prefix.
public boolean startsWith(java.lang.String prefix){
return false; //TODO codavaj!!
}
- /**
- * Tests if this string starts with the specified prefix beginning at the specified index.
- */
+ /// Tests if this string starts with the specified prefix beginning at the specified index.
public boolean startsWith(java.lang.String prefix, int toffset){
return false; //TODO codavaj!!
}
- /**
- * Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.
- * Examples:
- * "unhappy".substring(2) returns "happy" "Harbison".substring(3) returns "bison" "emptiness".substring(9) returns "" (an empty string)
- */
+ /// Returns a new string that is a substring of this string. The substring begins with the character at the specified index and extends to the end of this string.
+ /// Examples:
+ /// "unhappy".substring(2) returns "happy" "Harbison".substring(3) returns "bison" "emptiness".substring(9) returns "" (an empty string)
public java.lang.String substring(int beginIndex){
return null; //TODO codavaj!!
}
- /**
- * Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
- * Examples:
- * "hamburger".substring(4, 8) returns "urge" "smiles".substring(1, 5) returns "mile"
- */
+ /// Returns a new string that is a substring of this string. The substring begins at the specified beginIndex and extends to the character at index endIndex - 1. Thus the length of the substring is endIndex-beginIndex.
+ /// Examples:
+ /// "hamburger".substring(4, 8) returns "urge" "smiles".substring(1, 5) returns "mile"
public java.lang.String substring(int beginIndex, int endIndex){
return null; //TODO codavaj!!
}
- /**
- * Converts this string to a new character array.
- */
+ /// Converts this string to a new character array.
public char[] toCharArray(){
return null; //TODO codavaj!!
}
- /**
- * Converts all of the characters in this String to lower case.
- */
+ /// Converts all of the characters in this String to lower case.
public java.lang.String toLowerCase(){
return null; //TODO codavaj!!
}
- /**
- * This object (which is already a string!) is itself returned.
- */
+ /// This object (which is already a string!) is itself returned.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Converts all of the characters in this String to upper case.
- */
+ /// Converts all of the characters in this String to upper case.
public java.lang.String toUpperCase(){
return null; //TODO codavaj!!
}
@@ -469,27 +400,21 @@ public java.lang.String toUpperCase(java.util.Locale locale) {
return null; //TODO codavaj!!
}
- /**
- * Removes white space from both ends of this string.
- * If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes greater than 'u0020' (the space character), then a reference to this String object is returned.
- * Otherwise, if there is no character with a code greater than 'u0020' in the string, then a new String object representing an empty string is created and returned.
- * Otherwise, let k be the index of the first character in the string whose code is greater than 'u0020', and let m be the index of the last character in the string whose code is greater than 'u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k,m+1).
- * This method may be used to trim whitespace from the beginning and end of a string; in fact, it trims all ASCII control characters as well.
- */
+ /// Removes white space from both ends of this string.
+ /// If this String object represents an empty character sequence, or the first and last characters of character sequence represented by this String object both have codes greater than 'u0020' (the space character), then a reference to this String object is returned.
+ /// Otherwise, if there is no character with a code greater than 'u0020' in the string, then a new String object representing an empty string is created and returned.
+ /// Otherwise, let k be the index of the first character in the string whose code is greater than 'u0020', and let m be the index of the last character in the string whose code is greater than 'u0020'. A new String object is created, representing the substring of this string that begins with the character at index k and ends with the character at index m-that is, the result of this.substring(k,m+1).
+ /// This method may be used to trim whitespace from the beginning and end of a string; in fact, it trims all ASCII control characters as well.
public java.lang.String trim(){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the boolean argument.
- */
+ /// Returns the string representation of the boolean argument.
public static java.lang.String valueOf(boolean b){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the char argument.
- */
+ /// Returns the string representation of the char argument.
public static java.lang.String valueOf(char c){
return null; //TODO codavaj!!
}
@@ -498,49 +423,37 @@ java.lang.String valueOf(char[] data){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of a specific subarray of the char array argument.
- * The offset argument is the index of the first character of the subarray. The count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.
- */
+ /// Returns the string representation of a specific subarray of the char array argument.
+ /// The offset argument is the index of the first character of the subarray. The count argument specifies the length of the subarray. The contents of the subarray are copied; subsequent modification of the character array does not affect the newly created string.
public static java.lang.String valueOf(char[] data, int offset, int count){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the double argument.
- * The representation is exactly the one returned by the Double.toString method of one argument.
- */
+ /// Returns the string representation of the double argument.
+ /// The representation is exactly the one returned by the Double.toString method of one argument.
public static java.lang.String valueOf(double d){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the float argument.
- * The representation is exactly the one returned by the Float.toString method of one argument.
- */
+ /// Returns the string representation of the float argument.
+ /// The representation is exactly the one returned by the Float.toString method of one argument.
public static java.lang.String valueOf(float f){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the int argument.
- * The representation is exactly the one returned by the Integer.toString method of one argument.
- */
+ /// Returns the string representation of the int argument.
+ /// The representation is exactly the one returned by the Integer.toString method of one argument.
public static java.lang.String valueOf(int i){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the long argument.
- * The representation is exactly the one returned by the Long.toString method of one argument.
- */
+ /// Returns the string representation of the long argument.
+ /// The representation is exactly the one returned by the Long.toString method of one argument.
public static java.lang.String valueOf(long l){
return null; //TODO codavaj!!
}
- /**
- * Returns the string representation of the Object argument.
- */
+ /// Returns the string representation of the Object argument.
public static java.lang.String valueOf(java.lang.Object obj){
return null; //TODO codavaj!!
}
@@ -553,40 +466,49 @@ public static String format(String format, Object... args) {
return null; //TODO codavaj!!
}
- /**
- * Checks if string contains the given char sequence.
- * @param seq The charsequence to check
- * @return True if seq is contained in string.
- */
+ /// Checks if string contains the given char sequence.
+ ///
+ /// #### Parameters
+ ///
+ /// - `seq`: The charsequence to check
+ ///
+ /// #### Returns
+ ///
+ /// True if seq is contained in string.
public boolean contains(CharSequence seq) {
return false; //TODO codavaj!!
}
- /**
- * Checks if string is empty.
- * @return True if string is empty
- */
+ /// Checks if string is empty.
+ ///
+ /// #### Returns
+ ///
+ /// True if string is empty
public boolean isEmpty() {
return false; //TODO codavaj!!
}
- /**
- * Compares the specified string to this string and compares the specified
- * range of characters to determine if they are the same.
- *
- * @param thisStart
- * the starting offset in this string.
- * @param string
- * the string to compare.
- * @param start
- * the starting offset in the specified string.
- * @param length
- * the number of characters to compare.
- * @return {@code true} if the ranges of characters are equal, {@code false}
- * otherwise
- * @throws NullPointerException
- * if {@code string} is {@code null}.
- */
+ /// Compares the specified string to this string and compares the specified
+ /// range of characters to determine if they are the same.
+ ///
+ /// #### Parameters
+ ///
+ /// - `thisStart`: the starting offset in this string.
+ ///
+ /// - `string`: the string to compare.
+ ///
+ /// - `start`: the starting offset in the specified string.
+ ///
+ /// - `length`: the number of characters to compare.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the ranges of characters are equal, `false`
+ /// otherwise
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if `string` is `null`.
public boolean regionMatches(int thisStart, String string, int start, int length) {
return false;
}
diff --git a/Ports/CLDC11/src/java/lang/StringBuffer.java b/Ports/CLDC11/src/java/lang/StringBuffer.java
index 368a8986e0..38e02416a4 100644
--- a/Ports/CLDC11/src/java/lang/StringBuffer.java
+++ b/Ports/CLDC11/src/java/lang/StringBuffer.java
@@ -22,55 +22,43 @@
* have any questions.
*/
package java.lang;
-/**
- * A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
- * String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.
- * String buffers are used by the compiler to implement the binary string concatenation operator +. For example, the code:
- * is compiled to the equivalent of:
- * The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.
- * For example, if z refers to a string buffer object whose current contents are "start", then the method call z.append("le") would cause the string buffer to contain "startle", whereas z.insert(4, "le") would alter the string buffer to contain "starlet".
- * In general, if sb refers to an instance of a StringBuffer, then sb.append(x) has the same effect as sb.insert(sb.length(),x).
- * Every string buffer has a capacity. As long as the length of the character sequence contained in the string buffer does not exceed the capacity, it is not necessary to allocate a new internal buffer array. If the internal buffer overflows, it is automatically made larger.
- * Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, String
- */
+/// A string buffer implements a mutable sequence of characters. A string buffer is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
+/// String buffers are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.
+/// String buffers are used by the compiler to implement the binary string concatenation operator +. For example, the code:
+/// is compiled to the equivalent of:
+/// The principal operations on a StringBuffer are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string buffer. The append method always adds these characters at the end of the buffer; the insert method adds the characters at a specified point.
+/// For example, if z refers to a string buffer object whose current contents are "start", then the method call z.append("le") would cause the string buffer to contain "startle", whereas z.insert(4, "le") would alter the string buffer to contain "starlet".
+/// In general, if sb refers to an instance of a StringBuffer, then sb.append(x) has the same effect as sb.insert(sb.length(),x).
+/// Every string buffer has a capacity. As long as the length of the character sequence contained in the string buffer does not exceed the capacity, it is not necessary to allocate a new internal buffer array. If the internal buffer overflows, it is automatically made larger.
+/// Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, String
public final class StringBuffer implements CharSequence {
- /**
- * Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
- */
+ /// Constructs a string buffer with no characters in it and an initial capacity of 16 characters.
public StringBuffer(){
//TODO codavaj!!
}
- /**
- * Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
- * length - the initial capacity.
- * - if the length argument is less than 0.
- */
+ /// Constructs a string buffer with no characters in it and an initial capacity specified by the length argument.
+ /// length - the initial capacity.
+ /// - if the length argument is less than 0.
public StringBuffer(int length){
//TODO codavaj!!
}
- /**
- * Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string. The initial capacity of the string buffer is 16 plus the length of the string argument.
- * str - the initial contents of the buffer.
- */
+ /// Constructs a string buffer so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string buffer is a copy of the argument string. The initial capacity of the string buffer is 16 plus the length of the string argument.
+ /// str - the initial contents of the buffer.
public StringBuffer(java.lang.String str){
//TODO codavaj!!
}
- /**
- * Appends the string representation of the boolean argument to the string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the boolean argument to the string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(boolean b){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the char argument to this string buffer.
- * The argument is appended to the contents of this string buffer. The length of this string buffer increases by 1.
- * The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuffer object.
- */
+ /// Appends the string representation of the char argument to this string buffer.
+ /// The argument is appended to the contents of this string buffer. The length of this string buffer increases by 1.
+ /// The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuffer object.
public java.lang.StringBuffer append(char c){
return null; //TODO codavaj!!
}
@@ -79,123 +67,93 @@ java.lang.StringBuffer append(char[] str){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of a subarray of the char array argument to this string buffer.
- * Characters of the character array str, starting at index offset, are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the value of len.
- * The overall effect is exactly as if the arguments were converted to a string by the method String.valueOf(char[],int,int) and the characters of that string were then appended to this StringBuffer object.
- */
+ /// Appends the string representation of a subarray of the char array argument to this string buffer.
+ /// Characters of the character array str, starting at index offset, are appended, in order, to the contents of this string buffer. The length of this string buffer increases by the value of len.
+ /// The overall effect is exactly as if the arguments were converted to a string by the method String.valueOf(char[],int,int) and the characters of that string were then appended to this StringBuffer object.
public java.lang.StringBuffer append(char[] str, int offset, int len){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the double argument to this string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the double argument to this string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(double d){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the float argument to this string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the float argument to this string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(float f){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the int argument to this string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the int argument to this string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(int i){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the long argument to this string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the long argument to this string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(long l){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the Object argument to this string buffer.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
- */
+ /// Appends the string representation of the Object argument to this string buffer.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string buffer.
public java.lang.StringBuffer append(java.lang.Object obj){
return null; //TODO codavaj!!
}
- /**
- * Appends the string to this string buffer.
- * The characters of the String argument are appended, in order, to the contents of this string buffer, increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are appended to this string buffer.
- * Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str.
- */
+ /// Appends the string to this string buffer.
+ /// The characters of the String argument are appended, in order, to the contents of this string buffer, increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are appended to this string buffer.
+ /// Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str.
public java.lang.StringBuffer append(java.lang.String str){
return null; //TODO codavaj!!
}
- /**
- * Returns the current capacity of the String buffer. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
- */
+ /// Returns the current capacity of the String buffer. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
public int capacity(){
return 0; //TODO codavaj!!
}
- /**
- * The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned. The first character of a string buffer is at index 0, the next at index 1, and so on, for array indexing.
- * The index argument must be greater than or equal to 0, and less than the length of this string buffer.
- */
+ /// The specified character of the sequence currently represented by the string buffer, as indicated by the index argument, is returned. The first character of a string buffer is at index 0, the next at index 1, and so on, for array indexing.
+ /// The index argument must be greater than or equal to 0, and less than the length of this string buffer.
public char charAt(int index){
return ' '; //TODO codavaj!!
}
- /**
- * Removes the characters in a substring of this StringBuffer. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuffer if no such character exists. If start is equal to end, no changes are made.
- */
+ /// Removes the characters in a substring of this StringBuffer. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuffer if no such character exists. If start is equal to end, no changes are made.
public java.lang.StringBuffer delete(int start, int end){
return null; //TODO codavaj!!
}
- /**
- * Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
- */
+ /// Removes the character at the specified position in this StringBuffer (shortening the StringBuffer by one character).
public java.lang.StringBuffer deleteCharAt(int index){
return null; //TODO codavaj!!
}
- /**
- * Ensures that the capacity of the buffer is at least equal to the specified minimum. If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of: The minimumCapacity argument. Twice the old capacity, plus 2. If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
- */
+ /// Ensures that the capacity of the buffer is at least equal to the specified minimum. If the current capacity of this string buffer is less than the argument, then a new internal buffer is allocated with greater capacity. The new capacity is the larger of: The minimumCapacity argument. Twice the old capacity, plus 2. If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
public void ensureCapacity(int minimumCapacity){
return; //TODO codavaj!!
}
- /**
- * Characters are copied from this string buffer into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
- * dstbegin + (srcEnd-srcBegin) - 1
- */
+ /// Characters are copied from this string buffer into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
+ /// dstbegin + (srcEnd-srcBegin) - 1
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin){
return; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the boolean argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the boolean argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, boolean b){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the char argument into this string buffer.
- * The second argument is inserted into the contents of this string buffer at the position indicated by offset. The length of this string buffer increases by one.
- * The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then inserted into this StringBuffer object at the position indicated by offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the char argument into this string buffer.
+ /// The second argument is inserted into the contents of this string buffer at the position indicated by offset. The length of this string buffer increases by one.
+ /// The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then inserted into this StringBuffer object at the position indicated by offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, char c){
return null; //TODO codavaj!!
}
@@ -204,101 +162,79 @@ java.lang.StringBuffer insert(int offset, char[] str){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the double argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the double argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, double d){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the float argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the float argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, float f){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the second int argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the second int argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, int i){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the long argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the position indicated by offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the long argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the position indicated by offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, long l){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the Object argument into this string buffer.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string representation of the Object argument into this string buffer.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string buffer at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, java.lang.Object obj){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string into this string buffer.
- * The characters of the String argument are inserted, in order, into this string buffer at the indicated offset, moving up any characters originally above that position and increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are inserted into this string buffer.
- * The character at index k in the new character sequence is equal to: the character at index k in the old character sequence, if k is less than offset the character at index k-offset in the argument str, if k is not less than offset but is less than offset+str.length() the character at index k-str.length() in the old character sequence, if k is not less than offset+str.length()
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
- */
+ /// Inserts the string into this string buffer.
+ /// The characters of the String argument are inserted, in order, into this string buffer at the indicated offset, moving up any characters originally above that position and increasing the length of this string buffer by the length of the argument. If str is null, then the four characters "null" are inserted into this string buffer.
+ /// The character at index k in the new character sequence is equal to: the character at index k in the old character sequence, if k is less than offset the character at index k-offset in the argument str, if k is not less than offset but is less than offset+str.length() the character at index k-str.length() in the old character sequence, if k is not less than offset+str.length()
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string buffer.
public java.lang.StringBuffer insert(int offset, java.lang.String str){
return null; //TODO codavaj!!
}
- /**
- * Returns the length (character count) of this string buffer.
- */
+ /// Returns the length (character count) of this string buffer.
public int length(){
return 0; //TODO codavaj!!
}
- /**
- * The character sequence contained in this string buffer is replaced by the reverse of the sequence.
- * Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the reverse method. Then the character at index k in the new character sequence is equal to the character at index n-k-1 in the old character sequence.
- */
+ /// The character sequence contained in this string buffer is replaced by the reverse of the sequence.
+ /// Let n be the length of the old character sequence, the one contained in the string buffer just prior to execution of the reverse method. Then the character at index k in the new character sequence is equal to the character at index n-k-1 in the old character sequence.
public java.lang.StringBuffer reverse(){
return null; //TODO codavaj!!
}
- /**
- * The character at the specified index of this string buffer is set to ch. The string buffer is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.
- * The offset argument must be greater than or equal to 0, and less than the length of this string buffer.
- */
+ /// The character at the specified index of this string buffer is set to ch. The string buffer is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.
+ /// The offset argument must be greater than or equal to 0, and less than the length of this string buffer.
public void setCharAt(int index, char ch){
return; //TODO codavaj!!
}
- /**
- * Sets the length of this string buffer. This string buffer is altered to represent a new character sequence whose length is specified by the argument. For every nonnegative index
- * less than newLength, the character at index
- * in the new character sequence is the same as the character at index
- * in the old sequence if
- * is less than the length of the old character sequence; otherwise, it is the null character '\u0000'. In other words, if the newLength argument is less than the current length of the string buffer, the string buffer is truncated to contain exactly the number of characters given by the newLength argument.
- * If the newLength argument is greater than or equal to the current length, sufficient null characters ('u0000') are appended to the string buffer so that length becomes the newLength argument.
- * The newLength argument must be greater than or equal to 0.
- */
+ /// Sets the length of this string buffer. This string buffer is altered to represent a new character sequence whose length is specified by the argument. For every nonnegative index
+ /// less than newLength, the character at index
+ /// in the new character sequence is the same as the character at index
+ /// in the old sequence if
+ /// is less than the length of the old character sequence; otherwise, it is the null character '\u0000'. In other words, if the newLength argument is less than the current length of the string buffer, the string buffer is truncated to contain exactly the number of characters given by the newLength argument.
+ /// If the newLength argument is greater than or equal to the current length, sufficient null characters ('u0000') are appended to the string buffer so that length becomes the newLength argument.
+ /// The newLength argument must be greater than or equal to 0.
public void setLength(int newLength){
return; //TODO codavaj!!
}
- /**
- * Converts to a string representing the data in this string buffer. A new String object is allocated and initialized to contain the character sequence currently represented by this string buffer. This String is then returned. Subsequent changes to the string buffer do not affect the contents of the String.
- * Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string buffer. Any subsequent operation that alters the content or capacity of the string buffer must then make a copy of the internal buffer at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string buffer.
- */
+ /// Converts to a string representing the data in this string buffer. A new String object is allocated and initialized to contain the character sequence currently represented by this string buffer. This String is then returned. Subsequent changes to the string buffer do not affect the contents of the String.
+ /// Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string buffer. Any subsequent operation that alters the content or capacity of the string buffer must then make a copy of the internal buffer at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string buffer.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/StringBuilder.java b/Ports/CLDC11/src/java/lang/StringBuilder.java
index 9a06725392..f7d3ac90e1 100644
--- a/Ports/CLDC11/src/java/lang/StringBuilder.java
+++ b/Ports/CLDC11/src/java/lang/StringBuilder.java
@@ -22,55 +22,43 @@
* have any questions.
*/
package java.lang;
-/**
- * A string builder implements a mutable sequence of characters. A string builder is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
- * String builders are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.
- * String builders are used by the compiler to implement the binary string concatenation operator +. For example, the code:
- * is compiled to the equivalent of:
- * The principal operations on a StringBuilder are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string builder. The append method always adds these characters at the end of the builder; the insert method adds the characters at a specified point.
- * For example, if z refers to a string builder object whose current contents are "start", then the method call z.append("le") would cause the string builder to contain "startle", whereas z.insert(4, "le") would alter the string builder to contain "starlet".
- * In general, if sb refers to an instance of a StringBuilder, then sb.append(x) has the same effect as sb.insert(sb.length(),x).
- * Every string builder has a capacity. As long as the length of the character sequence contained in the string builder does not exceed the capacity, it is not necessary to allocate a new internal builder array. If the internal builder overflows, it is automatically made larger.
- * Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, String
- */
+/// A string builder implements a mutable sequence of characters. A string builder is like a String, but can be modified. At any point in time it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.
+/// String builders are safe for use by multiple threads. The methods are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.
+/// String builders are used by the compiler to implement the binary string concatenation operator +. For example, the code:
+/// is compiled to the equivalent of:
+/// The principal operations on a StringBuilder are the append and insert methods, which are overloaded so as to accept data of any type. Each effectively converts a given datum to a string and then appends or inserts the characters of that string to the string builder. The append method always adds these characters at the end of the builder; the insert method adds the characters at a specified point.
+/// For example, if z refers to a string builder object whose current contents are "start", then the method call z.append("le") would cause the string builder to contain "startle", whereas z.insert(4, "le") would alter the string builder to contain "starlet".
+/// In general, if sb refers to an instance of a StringBuilder, then sb.append(x) has the same effect as sb.insert(sb.length(),x).
+/// Every string builder has a capacity. As long as the length of the character sequence contained in the string builder does not exceed the capacity, it is not necessary to allocate a new internal builder array. If the internal builder overflows, it is automatically made larger.
+/// Since: JDK1.0, CLDC 1.0 See Also:ByteArrayOutputStream, String
public final class StringBuilder implements CharSequence {
- /**
- * Constructs a string builder with no characters in it and an initial capacity of 16 characters.
- */
+ /// Constructs a string builder with no characters in it and an initial capacity of 16 characters.
public StringBuilder(){
//TODO codavaj!!
}
- /**
- * Constructs a string builder with no characters in it and an initial capacity specified by the length argument.
- * length - the initial capacity.
- * - if the length argument is less than 0.
- */
+ /// Constructs a string builder with no characters in it and an initial capacity specified by the length argument.
+ /// length - the initial capacity.
+ /// - if the length argument is less than 0.
public StringBuilder(int length){
//TODO codavaj!!
}
- /**
- * Constructs a string builder so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string builder is a copy of the argument string. The initial capacity of the string builder is 16 plus the length of the string argument.
- * str - the initial contents of the builder.
- */
+ /// Constructs a string builder so that it represents the same sequence of characters as the string argument; in other words, the initial contents of the string builder is a copy of the argument string. The initial capacity of the string builder is 16 plus the length of the string argument.
+ /// str - the initial contents of the builder.
public StringBuilder(java.lang.String str){
//TODO codavaj!!
}
- /**
- * Appends the string representation of the boolean argument to the string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the boolean argument to the string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(boolean b){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the char argument to this string builder.
- * The argument is appended to the contents of this string builder. The length of this string builder increases by 1.
- * The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuilder object.
- */
+ /// Appends the string representation of the char argument to this string builder.
+ /// The argument is appended to the contents of this string builder. The length of this string builder increases by 1.
+ /// The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then appended to this StringBuilder object.
public java.lang.StringBuilder append(char c){
return null; //TODO codavaj!!
}
@@ -79,132 +67,106 @@ public java.lang.StringBuilder append(char[] str){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of a subarray of the char array argument to this string builder.
- * Characters of the character array str, starting at index offset, are appended, in order, to the contents of this string builder. The length of this string builder increases by the value of len.
- * The overall effect is exactly as if the arguments were converted to a string by the method String.valueOf(char[],int,int) and the characters of that string were then appended to this StringBuilder object.
- */
+ /// Appends the string representation of a subarray of the char array argument to this string builder.
+ /// Characters of the character array str, starting at index offset, are appended, in order, to the contents of this string builder. The length of this string builder increases by the value of len.
+ /// The overall effect is exactly as if the arguments were converted to a string by the method String.valueOf(char[],int,int) and the characters of that string were then appended to this StringBuilder object.
public java.lang.StringBuilder append(char[] str, int offset, int len){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the double argument to this string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the double argument to this string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(double d){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the float argument to this string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the float argument to this string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(float f){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the int argument to this string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the int argument to this string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(int i){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the long argument to this string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the long argument to this string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(long l){
return null; //TODO codavaj!!
}
- /**
- * Appends the string representation of the Object argument to this string builder.
- * The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
- */
+ /// Appends the string representation of the Object argument to this string builder.
+ /// The argument is converted to a string as if by the method String.valueOf, and the characters of that string are then appended to this string builder.
public java.lang.StringBuilder append(java.lang.Object obj){
return null; //TODO codavaj!!
}
- /**
- * Appends the string to this string builder.
- * The characters of the String argument are appended, in order, to the contents of this string builder, increasing the length of this string builder by the length of the argument. If str is null, then the four characters "null" are appended to this string builder.
- * Let n be the length of the old character sequence, the one contained in the string builder just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str.
- */
+ /// Appends the string to this string builder.
+ /// The characters of the String argument are appended, in order, to the contents of this string builder, increasing the length of this string builder by the length of the argument. If str is null, then the four characters "null" are appended to this string builder.
+ /// Let n be the length of the old character sequence, the one contained in the string builder just prior to execution of the append method. Then the character at index k in the new character sequence is equal to the character at index k in the old character sequence, if k is less than n; otherwise, it is equal to the character at index k-n in the argument str.
public java.lang.StringBuilder append(java.lang.String str){
return null; //TODO codavaj!!
}
- /**
- * Returns the current capacity of the String builder. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
- */
+ /// Returns the current capacity of the String builder. The capacity is the amount of storage available for newly inserted characters; beyond which an allocation will occur.
public int capacity(){
return 0; //TODO codavaj!!
}
- /**
- * The specified character of the sequence currently represented by the string builder, as indicated by the index argument, is returned. The first character of a string builder is at index 0, the next at index 1, and so on, for array indexing.
- * The index argument must be greater than or equal to 0, and less than the length of this string builder.
- */
+ /// The specified character of the sequence currently represented by the string builder, as indicated by the index argument, is returned. The first character of a string builder is at index 0, the next at index 1, and so on, for array indexing.
+ /// The index argument must be greater than or equal to 0, and less than the length of this string builder.
public char charAt(int index){
return ' '; //TODO codavaj!!
}
- /**
- * Removes the characters in a substring of this StringBuilder. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuilder if no such character exists. If start is equal to end, no changes are made.
- */
+ /// Removes the characters in a substring of this StringBuilder. The substring begins at the specified start and extends to the character at index end - 1 or to the end of the StringBuilder if no such character exists. If start is equal to end, no changes are made.
public java.lang.StringBuilder delete(int start, int end){
return null; //TODO codavaj!!
}
- /**
- * Appends StringBuffer to end of builder.
- * @param buf The string buffer to append
- * @return Self for chaining.
- */
+ /// Appends StringBuffer to end of builder.
+ ///
+ /// #### Parameters
+ ///
+ /// - `buf`: The string buffer to append
+ ///
+ /// #### Returns
+ ///
+ /// Self for chaining.
public java.lang.StringBuilder append(java.lang.StringBuffer buf){
return null; //TODO codavaj!!
}
- /**
- * Removes the character at the specified position in this StringBuilder (shortening the StringBuilder by one character).
- */
+ /// Removes the character at the specified position in this StringBuilder (shortening the StringBuilder by one character).
public java.lang.StringBuilder deleteCharAt(int index){
return null; //TODO codavaj!!
}
- /**
- * Ensures that the capacity of the builder is at least equal to the specified minimum. If the current capacity of this string builder is less than the argument, then a new internal builder is allocated with greater capacity. The new capacity is the larger of: The minimumCapacity argument. Twice the old capacity, plus 2. If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
- */
+ /// Ensures that the capacity of the builder is at least equal to the specified minimum. If the current capacity of this string builder is less than the argument, then a new internal builder is allocated with greater capacity. The new capacity is the larger of: The minimumCapacity argument. Twice the old capacity, plus 2. If the minimumCapacity argument is nonpositive, this method takes no action and simply returns.
public void ensureCapacity(int minimumCapacity){
return; //TODO codavaj!!
}
- /**
- * Characters are copied from this string builder into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
- * dstbegin + (srcEnd-srcBegin) - 1
- */
+ /// Characters are copied from this string builder into the destination character array dst. The first character to be copied is at index srcBegin; the last character to be copied is at index srcEnd-1. The total number of characters to be copied is srcEnd-srcBegin. The characters are copied into the subarray of dst starting at index dstBegin and ending at index:
+ /// dstbegin + (srcEnd-srcBegin) - 1
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin){
return; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the boolean argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the boolean argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, boolean b){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the char argument into this string builder.
- * The second argument is inserted into the contents of this string builder at the position indicated by offset. The length of this string builder increases by one.
- * The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then inserted into this StringBuilder object at the position indicated by offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the char argument into this string builder.
+ /// The second argument is inserted into the contents of this string builder at the position indicated by offset. The length of this string builder increases by one.
+ /// The overall effect is exactly as if the argument were converted to a string by the method String.valueOf(char) and the character in that string were then inserted into this StringBuilder object at the position indicated by offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, char c){
return null; //TODO codavaj!!
}
@@ -213,101 +175,79 @@ java.lang.StringBuilder insert(int offset, char[] str){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the double argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the double argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, double d){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the float argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the float argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, float f){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the second int argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the second int argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, int i){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the long argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the position indicated by offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the long argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the position indicated by offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, long l){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string representation of the Object argument into this string builder.
- * The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string representation of the Object argument into this string builder.
+ /// The second argument is converted to a string as if by the method String.valueOf, and the characters of that string are then inserted into this string builder at the indicated offset.
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, java.lang.Object obj){
return null; //TODO codavaj!!
}
- /**
- * Inserts the string into this string builder.
- * The characters of the String argument are inserted, in order, into this string builder at the indicated offset, moving up any characters originally above that position and increasing the length of this string builder by the length of the argument. If str is null, then the four characters "null" are inserted into this string builder.
- * The character at index k in the new character sequence is equal to: the character at index k in the old character sequence, if k is less than offset the character at index k-offset in the argument str, if k is not less than offset but is less than offset+str.length() the character at index k-str.length() in the old character sequence, if k is not less than offset+str.length()
- * The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
- */
+ /// Inserts the string into this string builder.
+ /// The characters of the String argument are inserted, in order, into this string builder at the indicated offset, moving up any characters originally above that position and increasing the length of this string builder by the length of the argument. If str is null, then the four characters "null" are inserted into this string builder.
+ /// The character at index k in the new character sequence is equal to: the character at index k in the old character sequence, if k is less than offset the character at index k-offset in the argument str, if k is not less than offset but is less than offset+str.length() the character at index k-str.length() in the old character sequence, if k is not less than offset+str.length()
+ /// The offset argument must be greater than or equal to 0, and less than or equal to the length of this string builder.
public java.lang.StringBuilder insert(int offset, java.lang.String str){
return null; //TODO codavaj!!
}
- /**
- * Returns the length (character count) of this string builder.
- */
+ /// Returns the length (character count) of this string builder.
public int length(){
return 0; //TODO codavaj!!
}
- /**
- * The character sequence contained in this string builder is replaced by the reverse of the sequence.
- * Let n be the length of the old character sequence, the one contained in the string builder just prior to execution of the reverse method. Then the character at index k in the new character sequence is equal to the character at index n-k-1 in the old character sequence.
- */
+ /// The character sequence contained in this string builder is replaced by the reverse of the sequence.
+ /// Let n be the length of the old character sequence, the one contained in the string builder just prior to execution of the reverse method. Then the character at index k in the new character sequence is equal to the character at index n-k-1 in the old character sequence.
public java.lang.StringBuilder reverse(){
return null; //TODO codavaj!!
}
- /**
- * The character at the specified index of this string builder is set to ch. The string builder is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.
- * The offset argument must be greater than or equal to 0, and less than the length of this string builder.
- */
+ /// The character at the specified index of this string builder is set to ch. The string builder is altered to represent a new character sequence that is identical to the old character sequence, except that it contains the character ch at position index.
+ /// The offset argument must be greater than or equal to 0, and less than the length of this string builder.
public void setCharAt(int index, char ch){
return; //TODO codavaj!!
}
- /**
- * Sets the length of this string builder. This string builder is altered to represent a new character sequence whose length is specified by the argument. For every nonnegative index
- * less than newLength, the character at index
- * in the new character sequence is the same as the character at index
- * in the old sequence if
- * is less than the length of the old character sequence; otherwise, it is the null character '\u0000'. In other words, if the newLength argument is less than the current length of the string builder, the string builder is truncated to contain exactly the number of characters given by the newLength argument.
- * If the newLength argument is greater than or equal to the current length, sufficient null characters ('u0000') are appended to the string builder so that length becomes the newLength argument.
- * The newLength argument must be greater than or equal to 0.
- */
+ /// Sets the length of this string builder. This string builder is altered to represent a new character sequence whose length is specified by the argument. For every nonnegative index
+ /// less than newLength, the character at index
+ /// in the new character sequence is the same as the character at index
+ /// in the old sequence if
+ /// is less than the length of the old character sequence; otherwise, it is the null character '\u0000'. In other words, if the newLength argument is less than the current length of the string builder, the string builder is truncated to contain exactly the number of characters given by the newLength argument.
+ /// If the newLength argument is greater than or equal to the current length, sufficient null characters ('u0000') are appended to the string builder so that length becomes the newLength argument.
+ /// The newLength argument must be greater than or equal to 0.
public void setLength(int newLength){
return; //TODO codavaj!!
}
- /**
- * Converts to a string representing the data in this string builder. A new String object is allocated and initialized to contain the character sequence currently represented by this string builder. This String is then returned. Subsequent changes to the string builder do not affect the contents of the String.
- * Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string builder. Any subsequent operation that alters the content or capacity of the string builder must then make a copy of the internal builder at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string builder.
- */
+ /// Converts to a string representing the data in this string builder. A new String object is allocated and initialized to contain the character sequence currently represented by this string builder. This String is then returned. Subsequent changes to the string builder do not affect the contents of the String.
+ /// Implementation advice: This method can be coded so as to create a new String object without allocating new memory to hold a copy of the character sequence. Instead, the string can share the memory used by the string builder. Any subsequent operation that alters the content or capacity of the string builder must then make a copy of the internal builder at that time. This strategy is effective for reducing the amount of memory allocated by a string concatenation operation when it is implemented using a string builder.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/StringIndexOutOfBoundsException.java b/Ports/CLDC11/src/java/lang/StringIndexOutOfBoundsException.java
index f328e3ba35..b7c1ca1acb 100644
--- a/Ports/CLDC11/src/java/lang/StringIndexOutOfBoundsException.java
+++ b/Ports/CLDC11/src/java/lang/StringIndexOutOfBoundsException.java
@@ -22,31 +22,23 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
- * Since: JDK1.0, CLDC 1.0 See Also:String.charAt(int)
- */
+/// Thrown by the charAt method in class String and by other String methods to indicate that an index is either negative or greater than or equal to the size of the string.
+/// Since: JDK1.0, CLDC 1.0 See Also:String.charAt(int)
public class StringIndexOutOfBoundsException extends java.lang.IndexOutOfBoundsException{
- /**
- * Constructs a StringIndexOutOfBoundsException with no detail message.
- * JDK1.0.
- */
+ /// Constructs a StringIndexOutOfBoundsException with no detail message.
+ /// JDK1.0.
public StringIndexOutOfBoundsException(){
//TODO codavaj!!
}
- /**
- * Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
- * index - the illegal index.
- */
+ /// Constructs a new StringIndexOutOfBoundsException class with an argument indicating the illegal index.
+ /// index - the illegal index.
public StringIndexOutOfBoundsException(int index){
//TODO codavaj!!
}
- /**
- * Constructs a StringIndexOutOfBoundsException with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a StringIndexOutOfBoundsException with the specified detail message.
+ /// s - the detail message.
public StringIndexOutOfBoundsException(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/SuppressWarnings.java b/Ports/CLDC11/src/java/lang/SuppressWarnings.java
index b6e4c936d9..955613ff49 100644
--- a/Ports/CLDC11/src/java/lang/SuppressWarnings.java
+++ b/Ports/CLDC11/src/java/lang/SuppressWarnings.java
@@ -21,14 +21,12 @@
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
-/**
- *
- * An annotation that indicates a compiler should suppress any warnings of the
- * type specified in the {@link #value()}.
- *
- *
- * @since 1.5
- */
+/// An annotation that indicates a compiler should suppress any warnings of the
+/// type specified in the `#value()`.
+///
+/// #### Since
+///
+/// 1.5
@Target( { ElementType.TYPE, ElementType.FIELD, ElementType.METHOD,
ElementType.PARAMETER, ElementType.CONSTRUCTOR,
ElementType.LOCAL_VARIABLE })
diff --git a/Ports/CLDC11/src/java/lang/System.java b/Ports/CLDC11/src/java/lang/System.java
index 44a518c553..77c136b34f 100644
--- a/Ports/CLDC11/src/java/lang/System.java
+++ b/Ports/CLDC11/src/java/lang/System.java
@@ -22,76 +22,58 @@
* have any questions.
*/
package java.lang;
-/**
- * The System class contains several useful class fields and methods. It cannot be instantiated.
- * Since: JDK1.0, CLDC 1.0
- */
+/// The System class contains several useful class fields and methods. It cannot be instantiated.
+/// Since: JDK1.0, CLDC 1.0
public final class System{
- /**
- * The "standard" error output stream. This stream is already open and ready to accept output data.
- * Typically this stream corresponds to display output or another output destination specified by the host environment or user. By convention, this output stream is used to display error messages or other information that should come to the immediate attention of a user even if the principal output stream, the value of the variable out, has been redirected to a file or other destination that is typically not continuously monitored.
- */
+ /// The "standard" error output stream. This stream is already open and ready to accept output data.
+ /// Typically this stream corresponds to display output or another output destination specified by the host environment or user. By convention, this output stream is used to display error messages or other information that should come to the immediate attention of a user even if the principal output stream, the value of the variable out, has been redirected to a file or other destination that is typically not continuously monitored.
public static final java.io.PrintStream err=null;
- /**
- * The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.
- * For simple stand-alone Java applications, a typical way to write a line of output data is:
- * System.out.println(data)
- * See the println methods in class PrintStream.
- * See Also:PrintStream.println(), PrintStream.println(boolean), PrintStream.println(char), PrintStream.println(char[]), PrintStream.println(int), PrintStream.println(long), PrintStream.println(java.lang.Object), PrintStream.println(java.lang.String)
- */
+ /// The "standard" output stream. This stream is already open and ready to accept output data. Typically this stream corresponds to display output or another output destination specified by the host environment or user.
+ /// For simple stand-alone Java applications, a typical way to write a line of output data is:
+ /// System.out.println(data)
+ /// See the println methods in class PrintStream.
+ /// See Also:PrintStream.println(), PrintStream.println(boolean), PrintStream.println(char), PrintStream.println(char[]), PrintStream.println(int), PrintStream.println(long), PrintStream.println(java.lang.Object), PrintStream.println(java.lang.String)
public static final java.io.PrintStream out=null;
- /**
- * Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. A subsequence of array components are copied from the source array referenced by src to the destination array referenced by dst. The number of components copied is equal to the length argument. The components at positions srcOffset through srcOffset+length-1 in the source array are copied into positions dstOffset through dstOffset+length-1, respectively, of the destination array.
- * If the src and dst arguments refer to the same array object, then the copying is performed as if the components at positions srcOffset through srcOffset+length-1 were first copied to a temporary array with length components and then the contents of the temporary array were copied into positions dstOffset through dstOffset+length-1 of the destination array.
- * If dst is null, then a NullPointerException is thrown.
- * If src is null, then a NullPointerException is thrown and the destination array is not modified.
- * Otherwise, if any of the following is true, an ArrayStoreException is thrown and the destination is not modified: The src argument refers to an object that is not an array. The dst argument refers to an object that is not an array. The src argument and dst argument refer to arrays whose component types are different primitive types. The src argument refers to an array with a primitive component type and the dst argument refers to an array with a reference component type. The src argument refers to an array with a reference component type and the dst argument refers to an array with a primitive component type.
- * Otherwise, if any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified: The srcOffset argument is negative. The dstOffset argument is negative. The length argument is negative. srcOffset+length is greater than src.length, the length of the source array. dstOffset+length is greater than dst.length, the length of the destination array.
- * Otherwise, if any actual component of the source array from position srcOffset through srcOffset+length-1 cannot be converted to the component type of the destination array by assignment conversion, an ArrayStoreException is thrown. In this case, let k be the smallest nonnegative integer less than length such that src[srcOffset+k] cannot be converted to the component type of the destination array; when the exception is thrown, source array components from positions srcOffset through srcOffset+k-1 will already have been copied to destination array positions dstOffset through dstOffset+k-1 and no other positions of the destination array will have been modified. (Because of the restrictions already itemized, this paragraph effectively applies only to the situation where both arrays have component types that are reference types.)
- */
+ /// Copies an array from the specified source array, beginning at the specified position, to the specified position of the destination array. A subsequence of array components are copied from the source array referenced by src to the destination array referenced by dst. The number of components copied is equal to the length argument. The components at positions srcOffset through srcOffset+length-1 in the source array are copied into positions dstOffset through dstOffset+length-1, respectively, of the destination array.
+ /// If the src and dst arguments refer to the same array object, then the copying is performed as if the components at positions srcOffset through srcOffset+length-1 were first copied to a temporary array with length components and then the contents of the temporary array were copied into positions dstOffset through dstOffset+length-1 of the destination array.
+ /// If dst is null, then a NullPointerException is thrown.
+ /// If src is null, then a NullPointerException is thrown and the destination array is not modified.
+ /// Otherwise, if any of the following is true, an ArrayStoreException is thrown and the destination is not modified: The src argument refers to an object that is not an array. The dst argument refers to an object that is not an array. The src argument and dst argument refer to arrays whose component types are different primitive types. The src argument refers to an array with a primitive component type and the dst argument refers to an array with a reference component type. The src argument refers to an array with a reference component type and the dst argument refers to an array with a primitive component type.
+ /// Otherwise, if any of the following is true, an IndexOutOfBoundsException is thrown and the destination is not modified: The srcOffset argument is negative. The dstOffset argument is negative. The length argument is negative. srcOffset+length is greater than src.length, the length of the source array. dstOffset+length is greater than dst.length, the length of the destination array.
+ /// Otherwise, if any actual component of the source array from position srcOffset through srcOffset+length-1 cannot be converted to the component type of the destination array by assignment conversion, an ArrayStoreException is thrown. In this case, let k be the smallest nonnegative integer less than length such that src[srcOffset+k] cannot be converted to the component type of the destination array; when the exception is thrown, source array components from positions srcOffset through srcOffset+k-1 will already have been copied to destination array positions dstOffset through dstOffset+k-1 and no other positions of the destination array will have been modified. (Because of the restrictions already itemized, this paragraph effectively applies only to the situation where both arrays have component types that are reference types.)
public static void arraycopy(java.lang.Object src, int srcOffset, java.lang.Object dst, int dstOffset, int length){
return; //TODO codavaj!!
}
- /**
- * Returns the current time in milliseconds.
- */
+ /// Returns the current time in milliseconds.
public static long currentTimeMillis(){
return 0l; //TODO codavaj!!
}
- /**
- * Terminates the currently running Java application. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
- * This method calls the exit method in class Runtime. This method never returns normally.
- * The call System.exit(n) is effectively equivalent to the call:
- * Runtime.getRuntime().exit(n)
- */
+ /// Terminates the currently running Java application. The argument serves as a status code; by convention, a nonzero status code indicates abnormal termination.
+ /// This method calls the exit method in class Runtime. This method never returns normally.
+ /// The call System.exit(n) is effectively equivalent to the call:
+ /// Runtime.getRuntime().exit(n)
public static void exit(int status){
return; //TODO codavaj!!
}
- /**
- * Runs the garbage collector.
- * Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects.
- * The call System.gc() is effectively equivalent to the call:
- * Runtime.getRuntime().gc()
- */
+ /// Runs the garbage collector.
+ /// Calling the gc method suggests that the Java Virtual Machine expend effort toward recycling unused objects in order to make the memory they currently occupy available for quick reuse. When control returns from the method call, the Java Virtual Machine has made a best effort to reclaim space from all discarded objects.
+ /// The call System.gc() is effectively equivalent to the call:
+ /// Runtime.getRuntime().gc()
public static void gc(){
return; //TODO codavaj!!
}
- /**
- * Gets the system property indicated by the specified key.
- */
+ /// Gets the system property indicated by the specified key.
public static java.lang.String getProperty(java.lang.String key){
return null; //TODO codavaj!!
}
- /**
- * Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hashcode for the null reference is zero.
- */
+ /// Returns the same hashcode for the given object as would be returned by the default method hashCode(), whether or not the given object's class overrides hashCode(). The hashcode for the null reference is zero.
public static int identityHashCode(java.lang.Object x){
return 0; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Thread.java b/Ports/CLDC11/src/java/lang/Thread.java
index add8b473ba..c949dfa9a5 100644
--- a/Ports/CLDC11/src/java/lang/Thread.java
+++ b/Ports/CLDC11/src/java/lang/Thread.java
@@ -22,149 +22,107 @@
* have any questions.
*/
package java.lang;
-/**
- * A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently.
- */
+/// A thread is a thread of execution in a program. The Java Virtual Machine allows an application to have multiple threads of execution running concurrently.
public class Thread implements java.lang.Runnable{
- /**
- * The maximum priority that a thread can have.
- * See Also:Constant Field Values
- */
+ /// The maximum priority that a thread can have.
+ /// See Also:Constant Field Values
public static final int MAX_PRIORITY=10;
- /**
- * The minimum priority that a thread can have.
- * See Also:Constant Field Values
- */
+ /// The minimum priority that a thread can have.
+ /// See Also:Constant Field Values
public static final int MIN_PRIORITY=1;
- /**
- * The default priority that is assigned to a thread.
- * See Also:Constant Field Values
- */
+ /// The default priority that is assigned to a thread.
+ /// See Also:Constant Field Values
public static final int NORM_PRIORITY=5;
- /**
- * Allocates a new Thread object.
- * Threads created this way must have overridden their run() method to actually do anything.
- */
+ /// Allocates a new Thread object.
+ /// Threads created this way must have overridden their run() method to actually do anything.
public Thread(){
//TODO codavaj!!
}
- /**
- * Allocates a new Thread object with a specific target object whose run method is called.
- * target - the object whose run method is called.
- */
+ /// Allocates a new Thread object with a specific target object whose run method is called.
+ /// target - the object whose run method is called.
public Thread(java.lang.Runnable target){
//TODO codavaj!!
}
- /**
- * Allocates a new Thread object with the given target and name.
- * target - the object whose run method is called.name - the name of the new thread.
- */
+ /// Allocates a new Thread object with the given target and name.
+ /// target - the object whose run method is called.name - the name of the new thread.
public Thread(java.lang.Runnable target, java.lang.String name){
//TODO codavaj!!
}
- /**
- * Allocates a new Thread object with the given name. Threads created this way must have overridden their run() method to actually do anything.
- * name - the name of the new thread.
- */
+ /// Allocates a new Thread object with the given name. Threads created this way must have overridden their run() method to actually do anything.
+ /// name - the name of the new thread.
public Thread(java.lang.String name){
//TODO codavaj!!
}
- /**
- * Returns the current number of active threads in the virtual machine.
- */
+ /// Returns the current number of active threads in the virtual machine.
public static int activeCount(){
return 0; //TODO codavaj!!
}
- /**
- * Returns a reference to the currently executing Thread object.
- */
+ /// Returns a reference to the currently executing Thread object.
public static java.lang.Thread currentThread(){
return null; //TODO codavaj!!
}
- /**
- * Returns this thread's name. Note that in CLDC the name of the thread can only be set when creating the thread.
- */
+ /// Returns this thread's name. Note that in CLDC the name of the thread can only be set when creating the thread.
public final java.lang.String getName(){
return null; //TODO codavaj!!
}
- /**
- * Returns this thread's priority.
- */
+ /// Returns this thread's priority.
public final int getPriority(){
return 0; //TODO codavaj!!
}
- /**
- * Interrupts this thread. In an implementation conforming to the CLDC Specification, this operation is not required to cancel or clean up any pending I/O operations that the thread may be waiting for.
- */
+ /// Interrupts this thread. In an implementation conforming to the CLDC Specification, this operation is not required to cancel or clean up any pending I/O operations that the thread may be waiting for.
public void interrupt(){
return; //TODO codavaj!!
}
- /**
- * Tests if this thread is alive. A thread is alive if it has been started and has not yet died.
- */
+ /// Tests if this thread is alive. A thread is alive if it has been started and has not yet died.
public final boolean isAlive(){
return false; //TODO codavaj!!
}
- /**
- * Waits for this thread to die.
- */
+ /// Waits for this thread to die.
public final void join() throws java.lang.InterruptedException{
return; //TODO codavaj!!
}
- /**
- * If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.
- * Subclasses of Thread should override this method.
- */
+ /// If this thread was constructed using a separate Runnable run object, then that Runnable object's run method is called; otherwise, this method does nothing and returns.
+ /// Subclasses of Thread should override this method.
public void run(){
return; //TODO codavaj!!
}
- /**
- * Changes the priority of this thread.
- */
+ /// Changes the priority of this thread.
public final void setPriority(int newPriority){
return; //TODO codavaj!!
}
- /**
- * Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. The thread does not lose ownership of any monitors.
- */
+ /// Causes the currently executing thread to sleep (temporarily cease execution) for the specified number of milliseconds. The thread does not lose ownership of any monitors.
public static void sleep(long millis) throws java.lang.InterruptedException{
return; //TODO codavaj!!
}
- /**
- * Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
- * The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
- */
+ /// Causes this thread to begin execution; the Java Virtual Machine calls the run method of this thread.
+ /// The result is that two threads are running concurrently: the current thread (which returns from the call to the start method) and the other thread (which executes its run method).
public void start(){
return; //TODO codavaj!!
}
- /**
- * Returns a string representation of this thread, including the thread's name and priority.
- */
+ /// Returns a string representation of this thread, including the thread's name and priority.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
- /**
- * Causes the currently executing thread object to temporarily pause and allow other threads to execute.
- */
+ /// Causes the currently executing thread object to temporarily pause and allow other threads to execute.
public static void yield(){
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/ThreadLocal.java b/Ports/CLDC11/src/java/lang/ThreadLocal.java
index a73757c3c4..080bffe17f 100644
--- a/Ports/CLDC11/src/java/lang/ThreadLocal.java
+++ b/Ports/CLDC11/src/java/lang/ThreadLocal.java
@@ -10,10 +10,7 @@
import java.util.Map;
import java.util.Set;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public class ThreadLocal extends Object {
private Map value = new HashMap();
diff --git a/Ports/CLDC11/src/java/lang/Throwable.java b/Ports/CLDC11/src/java/lang/Throwable.java
index 4d6f8afb30..a45188ab72 100644
--- a/Ports/CLDC11/src/java/lang/Throwable.java
+++ b/Ports/CLDC11/src/java/lang/Throwable.java
@@ -22,85 +22,73 @@
* have any questions.
*/
package java.lang;
-/**
- * The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or of one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement. Similarly, only this class or one of its subclasses can be the argument type in a catch clause.
- * Instances of two subclasses, Error and Exception, are conventionally used to indicate that exceptional situations have occurred. Typically, these instances are freshly created in the context of the exceptional situation so as to include relevant information (such as stack trace data).
- * By convention, class Throwable and its subclasses have two constructors, one that takes no arguments and one that takes a String argument that can be used to produce an error message.
- * A Throwable class contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error.
- * Here is one example of catching an exception:
- * Since: JDK1.0, CLDC 1.0
- */
+/// The Throwable class is the superclass of all errors and exceptions in the Java language. Only objects that are instances of this class (or of one of its subclasses) are thrown by the Java Virtual Machine or can be thrown by the Java throw statement. Similarly, only this class or one of its subclasses can be the argument type in a catch clause.
+/// Instances of two subclasses, Error and Exception, are conventionally used to indicate that exceptional situations have occurred. Typically, these instances are freshly created in the context of the exceptional situation so as to include relevant information (such as stack trace data).
+/// By convention, class Throwable and its subclasses have two constructors, one that takes no arguments and one that takes a String argument that can be used to produce an error message.
+/// A Throwable class contains a snapshot of the execution stack of its thread at the time it was created. It can also contain a message string that gives more information about the error.
+/// Here is one example of catching an exception:
+/// Since: JDK1.0, CLDC 1.0
public class Throwable{
- /**
- * Constructs a new Throwable with null as its error message string.
- */
+ /// Constructs a new Throwable with null as its error message string.
public Throwable(){
//TODO codavaj!!
}
- /**
- * Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
- * @param cause The cause
- */
+ /// Constructs a new throwable with the specified cause and a detail message of (cause==null ? null : cause.toString()) (which typically contains the class and detail message of cause).
+ ///
+ /// #### Parameters
+ ///
+ /// - `cause`: The cause
public Throwable(Throwable cause) {
}
- /**
- * @deprecated DO NOT USE THIS METHOD, its here just to get the compiler working and isn't intended for use
- */
+ /// #### Deprecated
+ ///
+ /// DO NOT USE THIS METHOD, its here just to get the compiler working and isn't intended for use
public Throwable initCause(Throwable cause) {
return null;
}
- /**
- * Returns the cause of this throwable or null if the cause is nonexistent or unknown.
- * @return
- */
+ /// Returns the cause of this throwable or null if the cause is nonexistent or unknown.
public Throwable getCause() {
return null;
}
- /**
- * Constructs a new Throwable with the specified error message.
- * message - the error message. The error message is saved for later retrieval by the
- * method.
- */
+ /// Constructs a new Throwable with the specified error message.
+ /// message - the error message. The error message is saved for later retrieval by the
+ /// method.
public Throwable(java.lang.String message){
//TODO codavaj!!
}
- /**
- * Constructs a new throwable with the specified detail message and cause.
- * @param message The error message.
- * @param cause The cause
- */
+ /// Constructs a new throwable with the specified detail message and cause.
+ ///
+ /// #### Parameters
+ ///
+ /// - `message`: The error message.
+ ///
+ /// - `cause`: The cause
public Throwable(java.lang.String message, Throwable cause) {
}
- /**
- * Returns the error message string of this Throwable object.
- */
+ /// Returns the error message string of this Throwable object.
public java.lang.String getMessage(){
return null; //TODO codavaj!!
}
- /**
- * Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. The first line of output contains the result of the
- * method for this object.
- * The format of the backtrace information depends on the implementation.
- */
+ /// Prints this Throwable and its backtrace to the standard error stream. This method prints a stack trace for this Throwable object on the error output stream that is the value of the field System.err. The first line of output contains the result of the
+ /// method for this object.
+ /// The format of the backtrace information depends on the implementation.
public void printStackTrace(){
return; //TODO codavaj!!
}
- /**
- * Returns a short description of this Throwable object. If this Throwable object was
- * with an error message string, then the result is the concatenation of three strings: The name of the actual class of this object ": " (a colon and a space) The result of the
- * method for this object If this Throwable object was
- * with no error message string, then the name of the actual class of this object is returned.
- */
+ /// Returns a short description of this Throwable object. If this Throwable object was
+ /// with an error message string, then the result is the concatenation of three strings: The name of the actual class of this object ": " (a colon and a space) The result of the
+ /// method for this object If this Throwable object was
+ /// with no error message string, then the name of the actual class of this object is returned.
public java.lang.String toString(){
return null; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/UnsupportedOperationException.java b/Ports/CLDC11/src/java/lang/UnsupportedOperationException.java
index 2af138a954..ef93993425 100644
--- a/Ports/CLDC11/src/java/lang/UnsupportedOperationException.java
+++ b/Ports/CLDC11/src/java/lang/UnsupportedOperationException.java
@@ -23,10 +23,7 @@
package java.lang;
-/**
- *
- * @author Shai Almog
- */
+/// @author Shai Almog
public class UnsupportedOperationException extends RuntimeException {
public UnsupportedOperationException() {
}
diff --git a/Ports/CLDC11/src/java/lang/VirtualMachineError.java b/Ports/CLDC11/src/java/lang/VirtualMachineError.java
index 46eb9a617c..0c5e7f7317 100644
--- a/Ports/CLDC11/src/java/lang/VirtualMachineError.java
+++ b/Ports/CLDC11/src/java/lang/VirtualMachineError.java
@@ -22,22 +22,16 @@
* have any questions.
*/
package java.lang;
-/**
- * Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
- * Since: JDK1.0, CLDC 1.0
- */
+/// Thrown to indicate that the Java Virtual Machine is broken or has run out of resources necessary for it to continue operating.
+/// Since: JDK1.0, CLDC 1.0
public abstract class VirtualMachineError extends java.lang.Error{
- /**
- * Constructs a VirtualMachineError with no detail message.
- */
+ /// Constructs a VirtualMachineError with no detail message.
public VirtualMachineError(){
//TODO codavaj!!
}
- /**
- * Constructs a VirtualMachineError with the specified detail message.
- * s - the detail message.
- */
+ /// Constructs a VirtualMachineError with the specified detail message.
+ /// s - the detail message.
public VirtualMachineError(java.lang.String s){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/Void.java b/Ports/CLDC11/src/java/lang/Void.java
index 7c84100e41..57954bd36d 100644
--- a/Ports/CLDC11/src/java/lang/Void.java
+++ b/Ports/CLDC11/src/java/lang/Void.java
@@ -23,10 +23,7 @@
*/
package java.lang;
-/**
- *
- * @author Shai Almog
- */
+/// @author Shai Almog
public final class Void {
public static final Class TYPE = Void.class;
}
diff --git a/Ports/CLDC11/src/java/lang/annotation/Annotation.java b/Ports/CLDC11/src/java/lang/annotation/Annotation.java
index a23ce298a1..3f70a2af1c 100644
--- a/Ports/CLDC11/src/java/lang/annotation/Annotation.java
+++ b/Ports/CLDC11/src/java/lang/annotation/Annotation.java
@@ -1,54 +1,44 @@
-/*
- * Copyright (c) 2008, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
- * CA 94065 USA or visit www.oracle.com if you need additional information or
- * have any questions.
- */
-package java.lang.annotation;
-
-/**
- * A mirror of java.lang.Annotation.
- *
- * @author Toby Reyelts
- */
-public interface Annotation {
-
- /**
- * Returns the annotation type of this annotation.
- */
- Class extends Annotation> annotationType();
-
- /**
- * Returns true if the specified object represents an annotation that is
- * logically equivalent to this one.
- */
- boolean equals(Object obj);
-
- /**
- * Returns the hash code of this annotation, as defined below:
- */
- int hashCode();
-
- /**
- * Returns a string representation of this annotation.
- */
- String toString();
-
-}
+/*
+ * Copyright (c) 2008, 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
+ * CA 94065 USA or visit www.oracle.com if you need additional information or
+ * have any questions.
+ */
+package java.lang.annotation;
+
+/// A mirror of java.lang.Annotation.
+///
+/// @author Toby Reyelts
+public interface Annotation {
+
+ /// Returns the annotation type of this annotation.
+ Class extends Annotation> annotationType();
+
+ /// Returns true if the specified object represents an annotation that is
+ /// logically equivalent to this one.
+ boolean equals(Object obj);
+
+ /// Returns the hash code of this annotation, as defined below:
+ int hashCode();
+
+ /// Returns a string representation of this annotation.
+ String toString();
+
+}
diff --git a/Ports/CLDC11/src/java/lang/annotation/AnnotationFormatError.java b/Ports/CLDC11/src/java/lang/annotation/AnnotationFormatError.java
index 9f58051b0b..8a81e1fd86 100644
--- a/Ports/CLDC11/src/java/lang/annotation/AnnotationFormatError.java
+++ b/Ports/CLDC11/src/java/lang/annotation/AnnotationFormatError.java
@@ -1,44 +1,42 @@
-/*
- * Copyright (c) 2008, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
- * CA 94065 USA or visit www.oracle.com if you need additional information or
- * have any questions.
- */
-package java.lang.annotation;
-
-/**
- * A mirror of java.lang.annotation.AnnotationFormatError.
- *
- * @author Toby Reyelts
- */
-public class AnnotationFormatError extends Error {
-
- public AnnotationFormatError(final String message) {
- super(message);
- }
-
- public AnnotationFormatError(final String message, final Throwable cause) {
- super(message);
- }
-
- public AnnotationFormatError(final Throwable cause) {
- super(cause.toString());
- }
-}
+/*
+ * Copyright (c) 2008, 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
+ * CA 94065 USA or visit www.oracle.com if you need additional information or
+ * have any questions.
+ */
+package java.lang.annotation;
+
+/// A mirror of java.lang.annotation.AnnotationFormatError.
+///
+/// @author Toby Reyelts
+public class AnnotationFormatError extends Error {
+
+ public AnnotationFormatError(final String message) {
+ super(message);
+ }
+
+ public AnnotationFormatError(final String message, final Throwable cause) {
+ super(message);
+ }
+
+ public AnnotationFormatError(final Throwable cause) {
+ super(cause.toString());
+ }
+}
diff --git a/Ports/CLDC11/src/java/lang/annotation/ElementType.java b/Ports/CLDC11/src/java/lang/annotation/ElementType.java
index a0d0c2f339..6af067e3be 100644
--- a/Ports/CLDC11/src/java/lang/annotation/ElementType.java
+++ b/Ports/CLDC11/src/java/lang/annotation/ElementType.java
@@ -1,43 +1,40 @@
-/*
- * Copyright (c) 2008, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
- * CA 94065 USA or visit www.oracle.com if you need additional information or
- * have any questions.
- */
-
-package java.lang.annotation;
-
-/**
- * A mirror of java.lang.annotation.ElementType.
- *
- * @author Toby Reyelts
- *
- */
-public enum ElementType {
- ANNOTATION_TYPE,
- CONSTRUCTOR,
- FIELD,
- LOCAL_VARIABLE,
- METHOD,
- PACKAGE,
- PARAMETER,
- TYPE;
-}
-
+/*
+ * Copyright (c) 2008, 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
+ * CA 94065 USA or visit www.oracle.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang.annotation;
+
+/// A mirror of java.lang.annotation.ElementType.
+///
+/// @author Toby Reyelts
+public enum ElementType {
+ ANNOTATION_TYPE,
+ CONSTRUCTOR,
+ FIELD,
+ LOCAL_VARIABLE,
+ METHOD,
+ PACKAGE,
+ PARAMETER,
+ TYPE;
+}
+
diff --git a/Ports/CLDC11/src/java/lang/annotation/IncompleteAnnotationException.java b/Ports/CLDC11/src/java/lang/annotation/IncompleteAnnotationException.java
index 1f390e4206..3fb90bc9c2 100644
--- a/Ports/CLDC11/src/java/lang/annotation/IncompleteAnnotationException.java
+++ b/Ports/CLDC11/src/java/lang/annotation/IncompleteAnnotationException.java
@@ -1,53 +1,51 @@
-/*
- * Copyright (c) 2008, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
- * CA 94065 USA or visit www.oracle.com if you need additional information or
- * have any questions.
- */
-package java.lang.annotation;
-
-import java.lang.annotation.Annotation;
-
-/**
- * A mirror of java.lang.annotation.IncompleteAnnotationException.
- *
- * @author Toby Reyelts
- */
-public class IncompleteAnnotationException extends RuntimeException {
-
- private final Class extends Annotation> annotationType_;
-
- private final String elementName_;
-
- public IncompleteAnnotationException(final Class extends Annotation> annotationType, final String elementName) {
- super(elementName + " in " + annotationType);
- this.annotationType_ = annotationType;
- this.elementName_ = elementName;
- }
-
- public Class extends Annotation> annotationType() {
- return annotationType_;
- }
-
- public String elementName() {
- return elementName_;
- }
-
-}
+/*
+ * Copyright (c) 2008, 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
+ * CA 94065 USA or visit www.oracle.com if you need additional information or
+ * have any questions.
+ */
+package java.lang.annotation;
+
+import java.lang.annotation.Annotation;
+
+/// A mirror of java.lang.annotation.IncompleteAnnotationException.
+///
+/// @author Toby Reyelts
+public class IncompleteAnnotationException extends RuntimeException {
+
+ private final Class extends Annotation> annotationType_;
+
+ private final String elementName_;
+
+ public IncompleteAnnotationException(final Class extends Annotation> annotationType, final String elementName) {
+ super(elementName + " in " + annotationType);
+ this.annotationType_ = annotationType;
+ this.elementName_ = elementName;
+ }
+
+ public Class extends Annotation> annotationType() {
+ return annotationType_;
+ }
+
+ public String elementName() {
+ return elementName_;
+ }
+
+}
diff --git a/Ports/CLDC11/src/java/lang/annotation/RetentionPolicy.java b/Ports/CLDC11/src/java/lang/annotation/RetentionPolicy.java
index 9c8bd89ecf..5a4597e465 100644
--- a/Ports/CLDC11/src/java/lang/annotation/RetentionPolicy.java
+++ b/Ports/CLDC11/src/java/lang/annotation/RetentionPolicy.java
@@ -1,38 +1,35 @@
-/*
- * Copyright (c) 2008, 2010, 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
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation. Oracle designates this
- * particular file as subject to the "Classpath" exception as provided
- * by Oracle in the LICENSE file that accompanied this code.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
- * CA 94065 USA or visit www.oracle.com if you need additional information or
- * have any questions.
- */
-
-package java.lang.annotation;
-
-/**
- * A mirror of java.lang.annotation.RetentionPolicy.
- *
- * @author Toby Reyelts
- *
- */
-public enum RetentionPolicy {
- CLASS,
- RUNTIME,
- SOURCE;
-}
-
+/*
+ * Copyright (c) 2008, 2010, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores
+ * CA 94065 USA or visit www.oracle.com if you need additional information or
+ * have any questions.
+ */
+
+package java.lang.annotation;
+
+/// A mirror of java.lang.annotation.RetentionPolicy.
+///
+/// @author Toby Reyelts
+public enum RetentionPolicy {
+ CLASS,
+ RUNTIME,
+ SOURCE;
+}
+
diff --git a/Ports/CLDC11/src/java/lang/invoke/CallSite.java b/Ports/CLDC11/src/java/lang/invoke/CallSite.java
index 991cbd741e..1c592da116 100644
--- a/Ports/CLDC11/src/java/lang/invoke/CallSite.java
+++ b/Ports/CLDC11/src/java/lang/invoke/CallSite.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated these classes are used internally for Lambda compatibility
- */
+/// #### Deprecated
+///
+/// these classes are used internally for Lambda compatibility
public abstract class CallSite {
public CallSite() {}
diff --git a/Ports/CLDC11/src/java/lang/invoke/LambdaMetafactory.java b/Ports/CLDC11/src/java/lang/invoke/LambdaMetafactory.java
index a7514ad5c8..373c954b2f 100644
--- a/Ports/CLDC11/src/java/lang/invoke/LambdaMetafactory.java
+++ b/Ports/CLDC11/src/java/lang/invoke/LambdaMetafactory.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated these classes are used internally for Lambda compatibility
- */
+/// #### Deprecated
+///
+/// these classes are used internally for Lambda compatibility
public class LambdaMetafactory {
public static final int FLAG_SERIALIZABLE = 1;
public static final int FLAG_MARKERS = 2;
diff --git a/Ports/CLDC11/src/java/lang/invoke/MethodHandle.java b/Ports/CLDC11/src/java/lang/invoke/MethodHandle.java
index ae77c308a4..1f494303c3 100644
--- a/Ports/CLDC11/src/java/lang/invoke/MethodHandle.java
+++ b/Ports/CLDC11/src/java/lang/invoke/MethodHandle.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated these classes are used internally for Lambda compatibility
- */
+/// #### Deprecated
+///
+/// these classes are used internally for Lambda compatibility
public abstract class MethodHandle {
public MethodHandle() {
}
diff --git a/Ports/CLDC11/src/java/lang/invoke/MethodHandles.java b/Ports/CLDC11/src/java/lang/invoke/MethodHandles.java
index 6a4df29d96..6d7825b0ec 100644
--- a/Ports/CLDC11/src/java/lang/invoke/MethodHandles.java
+++ b/Ports/CLDC11/src/java/lang/invoke/MethodHandles.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated these classes are used internally for Lambda compatibility
- */
+/// #### Deprecated
+///
+/// these classes are used internally for Lambda compatibility
public abstract class MethodHandles {
public MethodHandles() {
}
diff --git a/Ports/CLDC11/src/java/lang/invoke/MethodType.java b/Ports/CLDC11/src/java/lang/invoke/MethodType.java
index 88b8a1dd67..65d123a411 100644
--- a/Ports/CLDC11/src/java/lang/invoke/MethodType.java
+++ b/Ports/CLDC11/src/java/lang/invoke/MethodType.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated these classes are used internally for Lambda compatibility
- */
+/// #### Deprecated
+///
+/// these classes are used internally for Lambda compatibility
public class MethodType {
public MethodType() {}
public static java.lang.invoke.MethodType methodType(java.lang.Class> a, java.lang.Class>[] b) {
diff --git a/Ports/CLDC11/src/java/lang/invoke/StringConcatFactory.java b/Ports/CLDC11/src/java/lang/invoke/StringConcatFactory.java
index 140c598ced..a419be93ee 100644
--- a/Ports/CLDC11/src/java/lang/invoke/StringConcatFactory.java
+++ b/Ports/CLDC11/src/java/lang/invoke/StringConcatFactory.java
@@ -23,9 +23,9 @@
*/
package java.lang.invoke;
-/**
- * @deprecated this class is used internally for String concatenation compatibility
- */
+/// #### Deprecated
+///
+/// this class is used internally for String concatenation compatibility
public final class StringConcatFactory {
private StringConcatFactory() {
}
diff --git a/Ports/CLDC11/src/java/lang/ref/Reference.java b/Ports/CLDC11/src/java/lang/ref/Reference.java
index bdec7adebd..a121b02e01 100644
--- a/Ports/CLDC11/src/java/lang/ref/Reference.java
+++ b/Ports/CLDC11/src/java/lang/ref/Reference.java
@@ -22,21 +22,15 @@
* have any questions.
*/
package java.lang.ref;
-/**
- * Abstract base class for reference objects. This class defines the operations common to all reference objects. Because reference objects are implemented in close cooperation with the garbage collector, this class may not be subclassed directly.
- * Since: JDK1.2, CLDC 1.1
- */
+/// Abstract base class for reference objects. This class defines the operations common to all reference objects. Because reference objects are implemented in close cooperation with the garbage collector, this class may not be subclassed directly.
+/// Since: JDK1.2, CLDC 1.1
public abstract class Reference{
- /**
- * Clears this reference object.
- */
+ /// Clears this reference object.
public void clear(){
return; //TODO codavaj!!
}
- /**
- * Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
- */
+ /// Returns this reference object's referent. If this reference object has been cleared, either by the program or by the garbage collector, then this method returns null.
public java.lang.Object get(){
return null; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/ref/WeakReference.java b/Ports/CLDC11/src/java/lang/ref/WeakReference.java
index ae8de81250..bbf3209485 100644
--- a/Ports/CLDC11/src/java/lang/ref/WeakReference.java
+++ b/Ports/CLDC11/src/java/lang/ref/WeakReference.java
@@ -22,14 +22,10 @@
* have any questions.
*/
package java.lang.ref;
-/**
- * This class provides support for weak references. Weak references are most often used to implement canonicalizing mappings. Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all the weak references to that object and all weak references to any other weakly- reachable objects from which that object is reachable through a chain of strong and weak references.
- * Since: JDK1.2, CLDC 1.1
- */
+/// This class provides support for weak references. Weak references are most often used to implement canonicalizing mappings. Suppose that the garbage collector determines at a certain point in time that an object is weakly reachable. At that time it will atomically clear all the weak references to that object and all weak references to any other weakly- reachable objects from which that object is reachable through a chain of strong and weak references.
+/// Since: JDK1.2, CLDC 1.1
public class WeakReference extends java.lang.ref.Reference{
- /**
- * Creates a new weak reference that refers to the given object.
- */
+ /// Creates a new weak reference that refers to the given object.
public WeakReference(java.lang.Object ref){
//TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/lang/reflect/Array.java b/Ports/CLDC11/src/java/lang/reflect/Array.java
index 268a5d8171..cc0397f7eb 100644
--- a/Ports/CLDC11/src/java/lang/reflect/Array.java
+++ b/Ports/CLDC11/src/java/lang/reflect/Array.java
@@ -22,10 +22,8 @@
*/
package java.lang.reflect;
-/**
- * Added this for Kotlin
- * @author shannah
- */
+/// Added this for Kotlin
+/// @author shannah
public class Array {
public static Object newInstance(Class> componentType,
int[] dimensions) {
diff --git a/Ports/CLDC11/src/java/lang/reflect/Constructor.java b/Ports/CLDC11/src/java/lang/reflect/Constructor.java
index 853881aa2c..cdee6e8ee0 100644
--- a/Ports/CLDC11/src/java/lang/reflect/Constructor.java
+++ b/Ports/CLDC11/src/java/lang/reflect/Constructor.java
@@ -5,10 +5,7 @@
*/
package java.lang.reflect;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public class Constructor {
public String getName() {
return null;
diff --git a/Ports/CLDC11/src/java/lang/reflect/Method.java b/Ports/CLDC11/src/java/lang/reflect/Method.java
index 2b957869e3..2bb485b6c4 100644
--- a/Ports/CLDC11/src/java/lang/reflect/Method.java
+++ b/Ports/CLDC11/src/java/lang/reflect/Method.java
@@ -5,10 +5,7 @@
*/
package java.lang.reflect;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public class Method {
public String getName() {
return null;
diff --git a/Ports/CLDC11/src/java/lang/reflect/Type.java b/Ports/CLDC11/src/java/lang/reflect/Type.java
index a33939c8e2..1a15869cec 100644
--- a/Ports/CLDC11/src/java/lang/reflect/Type.java
+++ b/Ports/CLDC11/src/java/lang/reflect/Type.java
@@ -5,10 +5,7 @@
*/
package java.lang.reflect;
-/**
- *
- * @author shannah
- */
+/// @author shannah
public interface Type {
}
diff --git a/Ports/CLDC11/src/java/net/URI.java b/Ports/CLDC11/src/java/net/URI.java
index ac1cf36220..1443180d27 100644
--- a/Ports/CLDC11/src/java/net/URI.java
+++ b/Ports/CLDC11/src/java/net/URI.java
@@ -26,158 +26,120 @@
import java.util.List;
import java.util.StringTokenizer;
-/**
- * An implementation of a Univeral Resource Identifier (URI). While the output
- * is mostly compatible with the Java 6 API, there are a few somewhat subtle
- * differences:
- *
- *
- * 1) For socket related URIs, the toString() methods use semicolon (;) as the
- * query marker instead of the normal question mark (?), and the parameters are separated
- * with a semicolon instead of the normal ampersand (&). With this, the URIs are compatible
- * with those used by J2ME socket connectors. (The Java 6 API treats socket URIs as URNs).
- * 2) This implementation does not yet "rigorously parse IPv4" addresses like the Java 6 version does,
- * the host address is simply stored as provided by the caller. This will be enhanced using the
- * InetAddress class when available.
- * 3) The characters defined as legal "other characters" are not all interpreted correctly, which
- * just means some unicode characters will get encoded that aren't required to be. The
- * method URIHelper.isLegalUnicode() needs to be inspected further.
- * 4) Because of 3) toASCIIString() and toString() return the same value.
- * TODO: finish this list
- *
- *
- * @author Eric Coolman
- *
- * @see http://docs.oracle.com/javase/6/docs/api/java/net/URI.html
- * @see http://en.wikipedia.org/wiki/Uniform_resource_identifier
- * @see http://en.wikipedia.org/wiki/Uniform_resource_name
- * @see http://www.ietf.org/rfc/rfc2396.txt
- * @see http://www.ietf.org/rfc/rfc2732.txt
- * @see http://tools.ietf.org/html/rfc2141
- */
+/// An implementation of a Univeral Resource Identifier (URI). While the output
+/// is mostly compatible with the Java 6 API, there are a few somewhat subtle
+/// differences:
+///
+/// ```java
+/// 1) For socket related URIs, the toString() methods use semicolon (;) as the
+/// query marker instead of the normal question mark (?), and the parameters are separated
+/// with a semicolon instead of the normal ampersand (&). With this, the URIs are compatible
+/// with those used by J2ME socket connectors. (The Java 6 API treats socket URIs as URNs).
+/// 2) This implementation does not yet "rigorously parse IPv4" addresses like the Java 6 version does,
+/// the host address is simply stored as provided by the caller. This will be enhanced using the
+/// InetAddress class when available.
+/// 3) The characters defined as legal "other characters" are not all interpreted correctly, which
+/// just means some unicode characters will get encoded that aren't required to be. The
+/// method URIHelper.isLegalUnicode() needs to be inspected further.
+/// 4) Because of 3) toASCIIString() and toString() return the same value.
+/// TODO: finish this list
+/// ```
+///
+/// @author Eric Coolman
+///
+/// #### See also
+///
+/// - [http://docs.oracle.com/javase/6/docs/api/java/net/URI.html](http://docs.oracle.com/javase/6/docs/api/java/net/URI.html)
+///
+/// - [http://en.wikipedia.org/wiki/Uniform_resource_identifier](http://en.wikipedia.org/wiki/Uniform_resource_identifier)
+///
+/// - [http://en.wikipedia.org/wiki/Uniform_resource_name](http://en.wikipedia.org/wiki/Uniform_resource_name)
+///
+/// - [http://www.ietf.org/rfc/rfc2396.txt](http://www.ietf.org/rfc/rfc2396.txt)
+///
+/// - [http://www.ietf.org/rfc/rfc2732.txt](http://www.ietf.org/rfc/rfc2732.txt)
+///
+/// - [http://tools.ietf.org/html/rfc2141](http://tools.ietf.org/html/rfc2141)
public class URI {
- /**
- * Characters that are valid within a URI
- */
+ /// Characters that are valid within a URI
static final String UNRESERVED_EXTRAS = "_-!.~'()*";
- /**
- * Characters that have special meaning within a URI.
- */
+ /// Characters that have special meaning within a URI.
static final String PUNCTUATION = ",;:$&+=";
- /**
- * More characters that have special meaning within a URI.
- */
+ /// More characters that have special meaning within a URI.
static final String RESERVED = PUNCTUATION + "?/[]@";
- /**
- * Character that separates the scheme from the rest of the URI.
- */
+ /// Character that separates the scheme from the rest of the URI.
static final char SCHEME_SEPARATOR = ':';
- /**
- * Character that separates the port value within an authority.
- */
+ /// Character that separates the port value within an authority.
static final char PORT_SEPARATOR = ':';
- /**
- * Character that separates the user info value within an authority.
- */
+ /// Character that separates the user info value within an authority.
static final char USERINFO_SEPARATOR = '@';
- /**
- * Character that separates the path value from the authority
- */
+ /// Character that separates the path value from the authority
static final char PATH_SEPARATOR = '/';
- /**
- * A marker that identifies an authority value follows
- */
+ /// A marker that identifies an authority value follows
static final String AUTHORITY_MARKER = "//";
- /**
- * Character that identifies an escaped octet value.
- */
+ /// Character that identifies an escaped octet value.
static final char QUOTE_MARKER = '%';
- /**
- * Character that identifies the start of a query.
- */
+ /// Character that identifies the start of a query.
static final char QUERY_MARKER = '?';
- /**
- * Character that separates arguments within a query
- */
+ /// Character that separates arguments within a query
static final char QUERY_SEPARATOR = '&';
- /**
- * Character that separates name/value within a query parameter.
- */
+ /// Character that separates name/value within a query parameter.
static final char PARAMETER_SEPARATOR = '=';
- /**
- * Character that separates arguments within a query for socket-based URLs.
- */
+ /// Character that separates arguments within a query for socket-based URLs.
static final char SOCKET_QUERY_SEPARATOR = ';';
- /**
- * Character that identifies the start of a fragment.
- */
+ /// Character that identifies the start of a fragment.
static final char FRAGMENT_SEPARATOR = '#';
- /**
- * The character that should be used for separating query for this URI (; or
- * &).
- */
+ /// The character that should be used for separating query for this URI (; or
+ /// &).
private char querySeparator;
- /**
- * Flag that identifies if this URI has a scheme and starts with a '/'.
- */
+ /// Flag that identifies if this URI has a scheme and starts with a '/'.
private boolean opaque;
- /**
- * Flag that identifies if this URI is relative.
- */
+ /// Flag that identifies if this URI is relative.
private boolean absolute;
- /**
- * The encoded URI string value, without the scheme and fragment.
- */
+ /// The encoded URI string value, without the scheme and fragment.
private String schemeSpecificPart;
- /**
- * The userinfo, host, and port segment of the URI.
- */
+ /// The userinfo, host, and port segment of the URI.
private String authority;
- /**
- * The encoded userinfo part of the URI.
- */
+ /// The encoded userinfo part of the URI.
private String userInfo;
- /**
- * The encoded host value of the URI.
- */
+ /// The encoded host value of the URI.
private String host;
- /**
- * The URI scheme, or null for opaque URIs.
- */
+ /// The URI scheme, or null for opaque URIs.
private String scheme;
- /**
- * The encoded path value of the URI.
- */
+ /// The encoded path value of the URI.
private String path;
- /**
- * The encoded query value of the URI.
- */
+ /// The encoded query value of the URI.
private String query;
- /**
- * The encoded fragment value of the URI.
- */
+ /// The encoded fragment value of the URI.
private String fragment;
- /**
- * The port value of the URI, or -1 if no port specified.
- */
+ /// The port value of the URI, or -1 if no port specified.
private int port;
- /**
- * Constructor to create a new URI object. The userInfo, path, query and
- * fragment should be unencoded values - they will be encoded as required.
- *
- * @param scheme the scheme of the URI (for URLs, this would be the
- * protocol), or null for relative URIs.
- * @param userInfo the unencoded userinfo segment (ie. username:password) or
- * null.
- * @param host the hostname or address, or null.
- * @param port the host port, or -1.
- * @param path the unencoded path segment.
- * @param query the unencoded query segment.
- * @param fragment the unencoded fragment (often referred to as the
- * 'reference' or 'anchor'), or null.
- * @throws URISyntaxException if any of the fragments are invalid.
- */
+ /// Constructor to create a new URI object. The userInfo, path, query and
+ /// fragment should be unencoded values - they will be encoded as required.
+ ///
+ /// #### Parameters
+ ///
+ /// - `scheme`: @param scheme the scheme of the URI (for URLs, this would be the
+ /// protocol), or null for relative URIs.
+ ///
+ /// - `userInfo`: @param userInfo the unencoded userinfo segment (ie. username:password) or
+ /// null.
+ ///
+ /// - `host`: the hostname or address, or null.
+ ///
+ /// - `port`: the host port, or -1.
+ ///
+ /// - `path`: the unencoded path segment.
+ ///
+ /// - `query`: the unencoded query segment.
+ ///
+ /// - `fragment`: @param fragment the unencoded fragment (often referred to as the
+ /// 'reference' or 'anchor'), or null.
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if any of the fragments are invalid.
public URI(String scheme, String userInfo, String host, int port, String path, String query, String fragment)
throws URISyntaxException {
init();
@@ -188,20 +150,27 @@ public URI(String scheme, String userInfo, String host, int port, String path, S
setFragment(fragment, true);
}
- /**
- * Constructor to create a new URI object. The authority, path, query and
- * fragment should be unencoded values - they will be encoded as required.
- *
- * @param scheme the scheme of the URI (for URLs, this would be the
- * protocol), or null for relative URIs.
- * @param authority the unencoded authority segment (ie.
- * username:password@host:port, or simply: host) or null.
- * @param path the unencoded path segment.
- * @param query the unencoded query segment.
- * @param fragment the unencoded fragment (often referred to as the
- * 'reference' or 'anchor'), or null.
- * @throws URISyntaxException if any of the fragments are invalid.
- */
+ /// Constructor to create a new URI object. The authority, path, query and
+ /// fragment should be unencoded values - they will be encoded as required.
+ ///
+ /// #### Parameters
+ ///
+ /// - `scheme`: @param scheme the scheme of the URI (for URLs, this would be the
+ /// protocol), or null for relative URIs.
+ ///
+ /// - `authority`: @param authority the unencoded authority segment (ie.
+ /// username:password@host:port, or simply: host) or null.
+ ///
+ /// - `path`: the unencoded path segment.
+ ///
+ /// - `query`: the unencoded query segment.
+ ///
+ /// - `fragment`: @param fragment the unencoded fragment (often referred to as the
+ /// 'reference' or 'anchor'), or null.
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if any of the fragments are invalid.
public URI(String scheme, String authority, String path, String query, String fragment) throws URISyntaxException {
init();
setScheme(scheme);
@@ -211,19 +180,24 @@ public URI(String scheme, String authority, String path, String query, String fr
setFragment(fragment, true);
}
- /**
- * Constructor for building URNs. The ssp and fragment should be unencoded
- * values - they will be encoded as required.
- *
- * Examples: mailto:user@codenameone.com sms:+5555551212 tel:+5555551212
- * isbn:9781935182962
- *
- * @param scheme
- * @param ssp the unencoded scheme specific part (everything except the
- * scheme and fragment)
- * @param fragment the unencoded fragment, or null
- * @throws URISyntaxException if any of the segments are invalid.
- */
+ /// Constructor for building URNs. The ssp and fragment should be unencoded
+ /// values - they will be encoded as required.
+ ///
+ /// Examples: mailto:user@codenameone.com sms:+5555551212 tel:+5555551212
+ /// isbn:9781935182962
+ ///
+ /// #### Parameters
+ ///
+ /// - `scheme`
+ ///
+ /// - `ssp`: @param ssp the unencoded scheme specific part (everything except the
+ /// scheme and fragment)
+ ///
+ /// - `fragment`: the unencoded fragment, or null
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if any of the segments are invalid.
public URI(String scheme, String ssp, String fragment) throws URISyntaxException {
init();
setScheme(scheme);
@@ -231,14 +205,17 @@ public URI(String scheme, String ssp, String fragment) throws URISyntaxException
setFragment(fragment, true);
}
- /**
- * Constructor that parses its values from a URI string. This method expects
- * all segments to be property encoded by the caller. The URIHelper class
- * can be used to encode segments.
- *
- * @param uriString a full encoded URI in string form to be parsed.
- * @throws URISyntaxException if any of the parsed segments are invalid.
- */
+ /// Constructor that parses its values from a URI string. This method expects
+ /// all segments to be property encoded by the caller. The URIHelper class
+ /// can be used to encode segments.
+ ///
+ /// #### Parameters
+ ///
+ /// - `uriString`: a full encoded URI in string form to be parsed.
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if any of the parsed segments are invalid.
public URI(String uriString) throws URISyntaxException {
if (uriString == null) {
throw new URISyntaxException(uriString, "Input is null");
@@ -247,9 +224,7 @@ public URI(String uriString) throws URISyntaxException {
parseURI(uriString);
}
- /**
- * Internal - Set the default values.
- */
+ /// Internal - Set the default values.
void init() {
absolute = true;
querySeparator = QUERY_SEPARATOR;
@@ -257,12 +232,12 @@ void init() {
port = -1;
}
- /**
- * Utility method - set the scheme, ensuring valid format, and determining
- * the query separator to use.
- *
- * @see http://en.wikipedia.org/wiki/Uniform_resource_name
- */
+ /// Utility method - set the scheme, ensuring valid format, and determining
+ /// the query separator to use.
+ ///
+ /// #### See also
+ ///
+ /// - [http://en.wikipedia.org/wiki/Uniform_resource_name](http://en.wikipedia.org/wiki/Uniform_resource_name)
protected void setScheme(String scheme) throws URISyntaxException {
if ((this.scheme = scheme) == null) {
absolute = false;
@@ -276,89 +251,96 @@ protected void setScheme(String scheme) throws URISyntaxException {
}
}
- /**
- * Utility method - set the scheme specific part, ensuring valid format. If
- * encode=true, then some elements will be run through the encoder (path,
- * userinfo, query, fragment), otherwise the elements will be validated for
- * proper encoding.
- */
+ /// Utility method - set the scheme specific part, ensuring valid format. If
+ /// encode=true, then some elements will be run through the encoder (path,
+ /// userinfo, query, fragment), otherwise the elements will be validated for
+ /// proper encoding.
protected void setSchemeSpecificPart(String ssp, boolean encode) throws URISyntaxException {
parseSchemeSpecificPart(ssp, true);
}
- /**
- * Utility method - set the part, ensuring valid format. If encode=true,
- * then some elements will be run through the encoder (path, userinfo,
- * query, fragment), otherwise the elements will be validated for proper
- * encoding.
- */
+ /// Utility method - set the part, ensuring valid format. If encode=true,
+ /// then some elements will be run through the encoder (path, userinfo,
+ /// query, fragment), otherwise the elements will be validated for proper
+ /// encoding.
protected void setAuthority(String newAuthority, boolean encode) throws URISyntaxException {
}
- /**
- * Utility method to set the query. If parameter encode=true, then the
- * result will be encoded, otherwise the result will be validated to ensure
- * encoding is valid. Typically the multi-parameter constructors will call
- * this method with encode=true, and the single parameter construct will
- * pass encode=false.
- *
- * @param query
- * @param encode
- * @throws URISyntaxException
- */
+ /// Utility method to set the query. If parameter encode=true, then the
+ /// result will be encoded, otherwise the result will be validated to ensure
+ /// encoding is valid. Typically the multi-parameter constructors will call
+ /// this method with encode=true, and the single parameter construct will
+ /// pass encode=false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `query`
+ ///
+ /// - `encode`
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`
protected void setQuery(String query, boolean encode) throws URISyntaxException {
}
- /**
- * Utility method to set the path. If parameter encode=true, then the result
- * will be encoded, otherwise the result will be validated to ensure
- * encoding is valid. Typically the multi-parameter constructors will call
- * this method with encode=true, and the single parameter construct will
- * pass encode=false.
- *
- * @param path
- * @param encode
- * @throws URISyntaxException
- */
+ /// Utility method to set the path. If parameter encode=true, then the result
+ /// will be encoded, otherwise the result will be validated to ensure
+ /// encoding is valid. Typically the multi-parameter constructors will call
+ /// this method with encode=true, and the single parameter construct will
+ /// pass encode=false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `path`
+ ///
+ /// - `encode`
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`
protected void setPath(String path, boolean encode) throws URISyntaxException {
}
- /**
- * Utility method to construct the authority segment from given host, port,
- * and userinfo segments. If parameter encode=true, then the userinfo
- * segment will be encoded, otherwise the it will be validated to ensure
- * encoding is valid. Typically the multi-parameter constructors will call
- * this method with encode=true, and the single parameter construct will
- * pass encode=false.
- *
- * @param host
- * @param port
- * @param userInfo
- * @param encode
- * @throws URISyntaxException
- */
+ /// Utility method to construct the authority segment from given host, port,
+ /// and userinfo segments. If parameter encode=true, then the userinfo
+ /// segment will be encoded, otherwise the it will be validated to ensure
+ /// encoding is valid. Typically the multi-parameter constructors will call
+ /// this method with encode=true, and the single parameter construct will
+ /// pass encode=false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `host`
+ ///
+ /// - `port`
+ ///
+ /// - `userInfo`
+ ///
+ /// - `encode`
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`
protected void setAuthority(String host, int port, String userInfo, boolean encode) throws URISyntaxException {
}
- /**
- * Utility method to set the fragment. If parameter encode=true, then the
- * result will be encoded, otherwise the result will be validated to ensure
- * encoding is valid. Typically the multi-parameter constructors will call
- * this method with encode=true, and the single parameter construct will
- * pass encode=false.
- *
- * @param fragment
- * @param encode
- */
+ /// Utility method to set the fragment. If parameter encode=true, then the
+ /// result will be encoded, otherwise the result will be validated to ensure
+ /// encoding is valid. Typically the multi-parameter constructors will call
+ /// this method with encode=true, and the single parameter construct will
+ /// pass encode=false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `fragment`
+ ///
+ /// - `encode`
protected void setFragment(String fragment, boolean encode) {
}
- /**
- * Utility method to construct the scheme specific part from the uri
- * segments (less scheme and fragment)
- *
- * @return
- */
+ /// Utility method to construct the scheme specific part from the uri
+ /// segments (less scheme and fragment)
protected String rebuildSchemeSpecificPart() {
StringBuffer buffer = new StringBuffer();
if (opaque == false && (host != null || port != -1)) {
@@ -387,20 +369,23 @@ protected String rebuildSchemeSpecificPart() {
return buffer.toString();
}
- /**
- * A convenience factory method, intended to be used when the URI string is
- * known to be valid (ie. a static application URI), so it is not needed for
- * the caller to handle invalid syntax. NOTE: this is not away to avoid
- * handling errors altogether - passing an invalid URI string will result in
- * an IllegalArgumentException being thrown. The benefit here is that the
- * compiler will not complain if you don't explicitly handle the error at
- * compile time.
- *
- * When handling a user-editable URI, use the URI constructors instead.
- *
- * @param uriString URI address as a string
- * @return parsed URI object
- */
+ /// A convenience factory method, intended to be used when the URI string is
+ /// known to be valid (ie. a static application URI), so it is not needed for
+ /// the caller to handle invalid syntax. NOTE: this is not away to avoid
+ /// handling errors altogether - passing an invalid URI string will result in
+ /// an IllegalArgumentException being thrown. The benefit here is that the
+ /// compiler will not complain if you don't explicitly handle the error at
+ /// compile time.
+ ///
+ /// When handling a user-editable URI, use the URI constructors instead.
+ ///
+ /// #### Parameters
+ ///
+ /// - `uriString`: URI address as a string
+ ///
+ /// #### Returns
+ ///
+ /// parsed URI object
public static URI create(String uriString) {
URI uri;
try {
@@ -411,13 +396,16 @@ public static URI create(String uriString) {
return uri;
}
- /**
- * Rather than attempting to process the uri string in a linear fashion,
- * this implementation works its way from outside-in
- *
- * @param uriString
- * @throws URISyntaxException
- */
+ /// Rather than attempting to process the uri string in a linear fashion,
+ /// this implementation works its way from outside-in
+ ///
+ /// #### Parameters
+ ///
+ /// - `uriString`
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`
protected void parseURI(String uriString) throws URISyntaxException {
String s = uriString;
int index = s.indexOf(FRAGMENT_SEPARATOR);
@@ -436,19 +424,23 @@ protected void parseURI(String uriString) throws URISyntaxException {
parseSchemeSpecificPart(s, false);
}
- /**
- * Utility method used to parse a given scheme specific part. If parameter
- * encode=true, then the result will be encoded, otherwise the result will
- * be validated to ensure encoding is valid. Typically the multi-parameter
- * constructors will call this method with encode=true, and the single
- * parameter construct will pass encode=false.
- *
- * @param ssp scheme specific part (the URI without the scheme or fragment
- * included).
- * @param encode true if ssp needs to be encoded, false if ssp needs to be
- * verified.
- * @throws URISyntaxException if the ssp is invalid.
- */
+ /// Utility method used to parse a given scheme specific part. If parameter
+ /// encode=true, then the result will be encoded, otherwise the result will
+ /// be validated to ensure encoding is valid. Typically the multi-parameter
+ /// constructors will call this method with encode=true, and the single
+ /// parameter construct will pass encode=false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `ssp`: @param ssp scheme specific part (the URI without the scheme or fragment
+ /// included).
+ ///
+ /// - `encode`: @param encode true if ssp needs to be encoded, false if ssp needs to be
+ /// verified.
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if the ssp is invalid.
protected void parseSchemeSpecificPart(String ssp, boolean encode) throws URISyntaxException {
if (ssp == null) {
throw new URISyntaxException(ssp, "Invalid scheme specific part");
@@ -478,15 +470,22 @@ protected void parseSchemeSpecificPart(String ssp, boolean encode) throws URISyn
setAuthority(s, encode);
}
- /**
- * Internal utility method to throw a syntax error if a value can not be
- * parsed.
- *
- * @param key name of the value being parsed, for error reporting.
- * @param value value to be parsed.
- * @return parsed integer.
- * @throws URISyntaxException if value can not be parsed.
- */
+ /// Internal utility method to throw a syntax error if a value can not be
+ /// parsed.
+ ///
+ /// #### Parameters
+ ///
+ /// - `key`: name of the value being parsed, for error reporting.
+ ///
+ /// - `value`: value to be parsed.
+ ///
+ /// #### Returns
+ ///
+ /// parsed integer.
+ ///
+ /// #### Throws
+ ///
+ /// - `URISyntaxException`: if value can not be parsed.
int parseIntOption(String key, String value) throws URISyntaxException {
try {
return Integer.parseInt(value);
@@ -495,124 +494,122 @@ int parseIntOption(String key, String value) throws URISyntaxException {
}
}
- /**
- * Internal utility method to determine if the given scheme should use
- * semicolons (;) for query separator instead of ampersand (&)
- */
+ /// Internal utility method to determine if the given scheme should use
+ /// semicolons (;) for query separator instead of ampersand (&)
boolean isSocketScheme(String scheme) {
return false;
}
- /**
- * Verifies the scheme contains only valid characters as per the URN
- * specification (see NID).
- *
- * @see http://tools.ietf.org/html/rfc2141
- */
+ /// Verifies the scheme contains only valid characters as per the URN
+ /// specification (see NID).
+ ///
+ /// #### See also
+ ///
+ /// - [http://tools.ietf.org/html/rfc2141](http://tools.ietf.org/html/rfc2141)
boolean isValidScheme(String scheme) {
return true;
}
- /**
- * Get the scheme part of the URI.
- *
- * @return the scheme part of the URI.
- */
+ /// Get the scheme part of the URI.
+ ///
+ /// #### Returns
+ ///
+ /// the scheme part of the URI.
public String getScheme() {
return scheme;
}
- /**
- * Get the host name part of the URI.
- *
- * @return the host name part of the URI.
- */
+ /// Get the host name part of the URI.
+ ///
+ /// #### Returns
+ ///
+ /// the host name part of the URI.
public String getHost() {
return host;
}
- /**
- * Get the port number for this URI.
- *
- * @return the port number for this URI, or -1 if a port number was not
- * specified.
- */
+ /// Get the port number for this URI.
+ ///
+ /// #### Returns
+ ///
+ /// @return the port number for this URI, or -1 if a port number was not
+ /// specified.
public int getPort() {
return port;
}
- /**
- * Get the decoded path part of the uri.
- *
- * @return the query part of the URI, or an empty string if no path is
- * included in the URI.
- */
+ /// Get the decoded path part of the uri.
+ ///
+ /// #### Returns
+ ///
+ /// @return the query part of the URI, or an empty string if no path is
+ /// included in the URI.
public String getPath() {
return null;
}
- /**
- * Get the encoded path part of the uri.
- *
- * @return the query part of the URI, or an empty string if no path is
- * included in the URI.
- */
+ /// Get the encoded path part of the uri.
+ ///
+ /// #### Returns
+ ///
+ /// @return the query part of the URI, or an empty string if no path is
+ /// included in the URI.
public String getRawPath() {
return path;
}
- /**
- * Get the decoded query part of the uri. The query marker (?) itself is not
- * included in the result.
- *
- * @return the query part of the URI.
- */
+ /// Get the decoded query part of the uri. The query marker (?) itself is not
+ /// included in the result.
+ ///
+ /// #### Returns
+ ///
+ /// the query part of the URI.
public String getQuery() {
return null;
}
- /**
- * Get the encoded query part of the uri. The query marker (?) itself is not
- * included in the result.
- *
- * @return the query part of the URI.
- */
+ /// Get the encoded query part of the uri. The query marker (?) itself is not
+ /// included in the result.
+ ///
+ /// #### Returns
+ ///
+ /// the query part of the URI.
public String getRawQuery() {
return query;
}
- /**
- * Get the decoded fragment (otherwise known as the "reference" or
- * "anchor") part of the uri. The anchor marker (#) itself is not
- * included in the result.
- *
- * @return the anchor part of the URI.
- */
+ /// Get the decoded fragment (otherwise known as the "reference" or
+ /// "anchor") part of the uri. The anchor marker (#) itself is not
+ /// included in the result.
+ ///
+ /// #### Returns
+ ///
+ /// the anchor part of the URI.
public String getFragment() {
return null;
}
- /**
- * Get the encoded fragment (otherwise known as the "reference" or
- * "anchor") part of the uri. The anchor marker (#) itself is not
- * included in the result.
- *
- * @return the anchor part of the URI.
- */
+ /// Get the encoded fragment (otherwise known as the "reference" or
+ /// "anchor") part of the uri. The anchor marker (#) itself is not
+ /// included in the result.
+ ///
+ /// #### Returns
+ ///
+ /// the anchor part of the URI.
public String getRawFragment() {
return fragment;
}
- /**
- * @return the schemeSpecificPart
- */
+ /// #### Returns
+ ///
+ /// the schemeSpecificPart
public String getSchemeSpecificPart() {
return null;
}
- /**
- * @return the schemeSpecificPart
- */
+ /// #### Returns
+ ///
+ /// the schemeSpecificPart
public String getRawSchemeSpecificPart() {
if (schemeSpecificPart == null) {
schemeSpecificPart = rebuildSchemeSpecificPart();
@@ -620,66 +617,64 @@ public String getRawSchemeSpecificPart() {
return schemeSpecificPart;
}
- /**
- * @return the authority
- */
+ /// #### Returns
+ ///
+ /// the authority
public String getAuthority() {
return null;
}
- /**
- * @return the authority
- */
+ /// #### Returns
+ ///
+ /// the authority
public String getRawAuthority() {
return authority;
}
- /**
- * @return the userInfo
- */
+ /// #### Returns
+ ///
+ /// the userInfo
public String getUserInfo() {
return null;
}
- /**
- * @return the userInfo
- */
+ /// #### Returns
+ ///
+ /// the userInfo
public String getRawUserInfo() {
return userInfo;
}
- /**
- * @return true if this URI has a scheme and starts with a slash
- */
+ /// #### Returns
+ ///
+ /// true if this URI has a scheme and starts with a slash
public boolean isOpaque() {
return opaque;
}
- /**
- * @return true if the URI is not a relative URI.
- */
+ /// #### Returns
+ ///
+ /// true if the URI is not a relative URI.
public boolean isAbsolute() {
return absolute;
}
- /**
- * Get the character used for separating query. Normally this will return
- * '?'. On J2ME Connector URLs, this method will return ';'.
- */
+ /// Get the character used for separating query. Normally this will return
+ /// '?'. On J2ME Connector URLs, this method will return ';'.
char getQuerySeparator() {
return querySeparator;
}
- /**
- * @return the uri as a string
- */
+ /// #### Returns
+ ///
+ /// the uri as a string
public String toString() {
return toASCIIString();
}
- /**
- * @return the uri as a string with parts encoded.
- */
+ /// #### Returns
+ ///
+ /// the uri as a string with parts encoded.
public String toASCIIString() {
StringBuffer buffer = new StringBuffer();
if (scheme != null) {
@@ -692,13 +687,15 @@ public String toASCIIString() {
return buffer.toString();
}
- /**
- * Create a relative URI object against this URI, given the uri parameter.
- *
- * @param uri
- * @return
- * @see http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#relativize%28java.net.URI%29
- */
+ /// Create a relative URI object against this URI, given the uri parameter.
+ ///
+ /// #### Parameters
+ ///
+ /// - `uri`
+ ///
+ /// #### See also
+ ///
+ /// - [http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#relativize%28java.net.URI%29](http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#relativize%28java.net.URI%29)
public URI relativize(URI uri) {
if (isOpaque() || uri.isOpaque()) {
return uri;
@@ -726,13 +723,19 @@ public URI relativize(URI uri) {
}
}
- /**
- * Resolve a relative URI by merging it with this URI.
- *
- * @param uri a URI to resolve against this URI.
- * @return a new URI created by merging given URI with this URI.
- * @see http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#resolve%28java.net.URI%29
- */
+ /// Resolve a relative URI by merging it with this URI.
+ ///
+ /// #### Parameters
+ ///
+ /// - `uri`: a URI to resolve against this URI.
+ ///
+ /// #### Returns
+ ///
+ /// a new URI created by merging given URI with this URI.
+ ///
+ /// #### See also
+ ///
+ /// - [http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#resolve%28java.net.URI%29](http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#resolve%28java.net.URI%29)
public URI resolve(URI uri) {
if (isOpaque() || uri.isAbsolute()) {
return uri;
@@ -771,12 +774,15 @@ public URI resolve(URI uri) {
}
- /**
- * Normalize a URI by removing any "./" segments, and "path/../" segments.
- *
- * @return a new URI instance with redundant segments removed.
- * @see http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#normalize%28%29
- */
+ /// Normalize a URI by removing any "./" segments, and "path/../" segments.
+ ///
+ /// #### Returns
+ ///
+ /// a new URI instance with redundant segments removed.
+ ///
+ /// #### See also
+ ///
+ /// - [http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#normalize%28%29](http://docs.oracle.com/javase/6/docs/api/java/net/URI.html#normalize%28%29)
public URI normalize() {
return null;
}
diff --git a/Ports/CLDC11/src/java/net/URISyntaxException.java b/Ports/CLDC11/src/java/net/URISyntaxException.java
index 7463ca6599..a97475524f 100644
--- a/Ports/CLDC11/src/java/net/URISyntaxException.java
+++ b/Ports/CLDC11/src/java/net/URISyntaxException.java
@@ -23,30 +23,28 @@
*/
package java.net;
-/**
- * @author Eric Coolman
- *
- */
+/// @author Eric Coolman
public class URISyntaxException extends Exception {
private int index;
private String input;
private String reason;
- /**
- *
- * @param input
- * @param reason
- */
+ /// #### Parameters
+ ///
+ /// - `input`
+ ///
+ /// - `reason`
public URISyntaxException(String input, String reason) {
this(input, reason, -1);
}
- /**
- *
- * @param input
- * @param reason
- * @param index
- */
+ /// #### Parameters
+ ///
+ /// - `input`
+ ///
+ /// - `reason`
+ ///
+ /// - `index`
public URISyntaxException(String input, String reason, int index) {
super(reason);
this.reason = reason;
@@ -54,44 +52,44 @@ public URISyntaxException(String input, String reason, int index) {
this.input = input;
}
- /**
- * @return the index
- */
+ /// #### Returns
+ ///
+ /// the index
public int getIndex() {
return index;
}
- /**
- * @param index the index to set
- */
+ /// #### Parameters
+ ///
+ /// - `index`: the index to set
void setIndex(int index) {
this.index = index;
}
- /**
- * @return the input
- */
+ /// #### Returns
+ ///
+ /// the input
public String getInput() {
return input;
}
- /**
- * @param input the input to set
- */
+ /// #### Parameters
+ ///
+ /// - `input`: the input to set
void setInput(String input) {
this.input = input;
}
- /**
- * @return the reason
- */
+ /// #### Returns
+ ///
+ /// the reason
public String getReason() {
return reason;
}
- /**
- * @param reason the reason to set
- */
+ /// #### Parameters
+ ///
+ /// - `reason`: the reason to set
void setReason(String reason) {
this.reason = reason;
}
diff --git a/Ports/CLDC11/src/java/nio/charset/Charset.java b/Ports/CLDC11/src/java/nio/charset/Charset.java
index 1da3a2b4d1..b7618758e4 100644
--- a/Ports/CLDC11/src/java/nio/charset/Charset.java
+++ b/Ports/CLDC11/src/java/nio/charset/Charset.java
@@ -22,10 +22,8 @@
*/
package java.nio.charset;
-/**
- * Added this for Kotlin
- * @author shannah
- */
+/// Added this for Kotlin
+/// @author shannah
public class Charset implements Comparable {
private String name;
diff --git a/Ports/CLDC11/src/java/nio/charset/StandardCharsets.java b/Ports/CLDC11/src/java/nio/charset/StandardCharsets.java
index e0dccfea90..8b094883b0 100644
--- a/Ports/CLDC11/src/java/nio/charset/StandardCharsets.java
+++ b/Ports/CLDC11/src/java/nio/charset/StandardCharsets.java
@@ -9,9 +9,7 @@
*/
package java.nio.charset;
-/**
- * Minimal charset constants supported by CLDC11 stubs.
- */
+/// Minimal charset constants supported by CLDC11 stubs.
public final class StandardCharsets {
private StandardCharsets() {
}
diff --git a/Ports/CLDC11/src/java/text/DateFormat.java b/Ports/CLDC11/src/java/text/DateFormat.java
index 4825e56129..6c9c55049e 100644
--- a/Ports/CLDC11/src/java/text/DateFormat.java
+++ b/Ports/CLDC11/src/java/text/DateFormat.java
@@ -25,185 +25,220 @@
import java.util.Date;
-/**
- * A class for parsing and formatting localisation sensitive dates, compatible
- * with Jave 6 SDK. This implementation uses the Codename One localization manager for handling formatting dates. Parsing
- * dates is not implemented in this class since the localization pattern is not
- * exposed.
- *
- * @author Eric Coolman
- * @see http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html
- * @deprecated this class has many issues in iOS and other platforms, please use the L10NManager
- */
+/// A class for parsing and formatting localisation sensitive dates, compatible
+/// with Jave 6 SDK. This implementation uses the Codename One localization manager for handling formatting dates. Parsing
+/// dates is not implemented in this class since the localization pattern is not
+/// exposed.
+///
+/// @author Eric Coolman
+///
+/// #### Deprecated
+///
+/// this class has many issues in iOS and other platforms, please use the L10NManager
+///
+/// #### See also
+///
+/// - [http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html](http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html)
public class DateFormat extends Format {
- /**
- * Constant for full style parsing/formatting pattern.
- */
+ /// Constant for full style parsing/formatting pattern.
public static final int FULL = 0;
- /**
- * Constant for long style parsing/formatting pattern.
- */
+ /// Constant for long style parsing/formatting pattern.
public static final int LONG = 1;
- /**
- * Constant for medium style parsing/formatting pattern.
- */
+ /// Constant for medium style parsing/formatting pattern.
public static final int MEDIUM = 2;
- /**
- * Constant for short style parsing/formatting pattern.
- */
+ /// Constant for short style parsing/formatting pattern.
public static final int SHORT = 3;
- /**
- * Constant for default style (MEDIUM) parsing/formatting pattern.
- */
+ /// Constant for default style (MEDIUM) parsing/formatting pattern.
public static final int DEFAULT = MEDIUM;
private int dateStyle;
private int timeStyle;
- /**
- * Construct a date formatter using default patterns for date and time (SHORT/SHORT).
- */
+ /// Construct a date formatter using default patterns for date and time (SHORT/SHORT).
DateFormat() {
this(SHORT, SHORT);
}
- /**
- *
- */
+ ///
DateFormat(int dateStyle, int timeStyle) {
this.dateStyle = dateStyle;
this.timeStyle = timeStyle;
}
- /**
- * Format a given object.
- *
- * @obj object to be formatted.
- * @return formatted object.
- * @throws IllegalArgumentException of the source can not be formatted.
- */
+ /// Format a given object.
+ ///
+ /// @obj object to be formatted.
+ ///
+ /// #### Returns
+ ///
+ /// formatted object.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: of the source can not be formatted.
@Override
public String format(Object obj) throws IllegalArgumentException {
return format(obj, new StringBuffer());
}
- /**
- * Format a given object.
- *
- * @param source object to be formatted.
- * @param toAppendTo buffer to which to append output.
- * @return formatted date.
- * @throws IllegalArgumentException of the source can not be formatted.
- */
+ /// Format a given object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: object to be formatted.
+ ///
+ /// - `toAppendTo`: buffer to which to append output.
+ ///
+ /// #### Returns
+ ///
+ /// formatted date.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: of the source can not be formatted.
String format(Object obj, StringBuffer toAppendTo) throws IllegalArgumentException {
return null;
}
- /**
- * Format a given date.
- *
- * @param source date to be formatted.
- * @return formatted date.
- */
+ /// Format a given date.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: date to be formatted.
+ ///
+ /// #### Returns
+ ///
+ /// formatted date.
public String format(Date source) {
return format(source, new StringBuffer());
}
- /**
- * Format a given date.
- *
- * @param source date to be formatted.
- * @param toAppendTo buffer to which to append output.
- * @return formatted date.
- */
+ /// Format a given date.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: date to be formatted.
+ ///
+ /// - `toAppendTo`: buffer to which to append output.
+ ///
+ /// #### Returns
+ ///
+ /// formatted date.
String format(Date source, StringBuffer toAppendTo) {
return null;
}
- /**
- * NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
- */
+ /// NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
@Override
public Object parseObject(String source) throws ParseException {
// can't parse because we don't know the L10NManagers templates
throw new ParseException("Not implemented", 0);
}
- /**
- * NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
- */
+ /// NOT IMPLEMENTED - use SimpleDateFormat for parsing instead.
public Date parse(String source) throws ParseException {
return (Date) parseObject(source);
}
- /**
- * Get a DateFormat instance with default style for date/time (SHORT/SHORT).
- * @return a DateFormat instance.
- */
+ /// Get a DateFormat instance with default style for date/time (SHORT/SHORT).
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
public static final DateFormat getInstance() {
return getDateTimeInstance(SHORT, SHORT);
}
- /**
- * Get a DateFormat instance with default style for date (SHORT).
- * @return a DateFormat instance.
- */
+ /// Get a DateFormat instance with default style for date (SHORT).
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
public static final DateFormat getDateInstance() {
return getDateInstance(SHORT);
}
- /**
- * Get a DateFormat instance with default style for time (SHORT).
- * @return a DateFormat instance.
- */
+ /// Get a DateFormat instance with default style for time (SHORT).
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
public static final DateFormat getTimeInstance() {
return getTimeInstance(SHORT);
}
- /**
- * Get a DateFormat instance that uses a given style for dates.
- *
- * @param style style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
- * @return a DateFormat instance.
- * @see #SHORT
- * @see #MEDIUM
- * @see #LONG
- * @see #FULL
- * @see #DEFAULT
- */
+ /// Get a DateFormat instance that uses a given style for dates.
+ ///
+ /// #### Parameters
+ ///
+ /// - `style`: style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
+ ///
+ /// #### See also
+ ///
+ /// - #SHORT
+ ///
+ /// - #MEDIUM
+ ///
+ /// - #LONG
+ ///
+ /// - #FULL
+ ///
+ /// - #DEFAULT
public static final DateFormat getDateInstance(int style) {
return getDateTimeInstance(style, DEFAULT);
}
- /**
- * Get a DateFormat instance that uses a given style for times.
- *
- * @param style style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
- * @return a DateFormat instance.
- * @see #SHORT
- * @see #MEDIUM
- * @see #LONG
- * @see #FULL
- * @see #DEFAULT
- */
+ /// Get a DateFormat instance that uses a given style for times.
+ ///
+ /// #### Parameters
+ ///
+ /// - `style`: style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
+ ///
+ /// #### See also
+ ///
+ /// - #SHORT
+ ///
+ /// - #MEDIUM
+ ///
+ /// - #LONG
+ ///
+ /// - #FULL
+ ///
+ /// - #DEFAULT
public static final DateFormat getTimeInstance(int style) {
return getDateTimeInstance(DEFAULT, style);
}
- /**
- * Get a DateFormat instance that uses a given style for dates and times.
- *
- * @param style style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
- * @return a DateFormat instance.
- * @see #SHORT
- * @see #MEDIUM
- * @see #LONG
- * @see #FULL
- * @see #DEFAULT
- */
+ /// Get a DateFormat instance that uses a given style for dates and times.
+ ///
+ /// #### Parameters
+ ///
+ /// - `style`: style to use for parsing and formatting (SHORT, MEDIUM, LONG, FULL, DEFAULT);
+ ///
+ /// #### Returns
+ ///
+ /// a DateFormat instance.
+ ///
+ /// #### See also
+ ///
+ /// - #SHORT
+ ///
+ /// - #MEDIUM
+ ///
+ /// - #LONG
+ ///
+ /// - #FULL
+ ///
+ /// - #DEFAULT
public static final DateFormat getDateTimeInstance(int dateStyle, int timeStyle) {
return new DateFormat(dateStyle, timeStyle);
}
diff --git a/Ports/CLDC11/src/java/text/DateFormatPatterns.java b/Ports/CLDC11/src/java/text/DateFormatPatterns.java
index 71b29954e1..c1c7eb3415 100644
--- a/Ports/CLDC11/src/java/text/DateFormatPatterns.java
+++ b/Ports/CLDC11/src/java/text/DateFormatPatterns.java
@@ -22,43 +22,24 @@
*/
package java.text;
-/**
- * Common patterns for dates, times, and timestamps.
- *
- * @author Eric Coolman
- *
- */
+/// Common patterns for dates, times, and timestamps.
+///
+/// @author Eric Coolman
class DateFormatPatterns {
- /**
- * Pattern for parsing/formatting RFC-2822 timestamp.
- */
+ /// Pattern for parsing/formatting RFC-2822 timestamp.
public static final String RFC2822 = "EEE, dd MMM yyyy HH:mm:ss Z";
- /**
- * Pattern for parsing/formatting RFC-822 timestamp.
- */
+ /// Pattern for parsing/formatting RFC-822 timestamp.
public static final String RFC822 = RFC2822;
- /**
- * Pattern for parsing/formatting ISO8601 timestamp.
- */
+ /// Pattern for parsing/formatting ISO8601 timestamp.
public static final String ISO8601 = "yyyy-MM-dd'T'HH:mm:ssZ";
- /**
- * Pattern for parsing/formatting Twitter timeline timestamp.
- */
+ /// Pattern for parsing/formatting Twitter timeline timestamp.
public static final String TWITTER_TIMELINE = "EEE MMM dd HH:mm:ss ZZZ yyyy";
- /**
- * Pattern for parsing/formatting Twitter search timestamp.
- */
+ /// Pattern for parsing/formatting Twitter search timestamp.
public static final String TWITTER_SEARCH = "EEE, dd MMM yyyy HH:mm:ss Z";
- /**
- * Pattern for a verbose date
- */
+ /// Pattern for a verbose date
public static final String VERBOSE_DATE = "EEEE, MMM dd, yyyy";
- /**
- * Pattern for a verbose time
- */
+ /// Pattern for a verbose time
public static final String VERBOSE_TIME = "HH:mm:ssaa z";
- /**
- * Pattern for a verbose timestamp
- */
+ /// Pattern for a verbose timestamp
public static final String VERBOSE_TIMESTAMP = VERBOSE_DATE + ", " + VERBOSE_TIME;
}
diff --git a/Ports/CLDC11/src/java/text/DateFormatSymbols.java b/Ports/CLDC11/src/java/text/DateFormatSymbols.java
index 48c4ecfe1e..6bd1e0df4d 100644
--- a/Ports/CLDC11/src/java/text/DateFormatSymbols.java
+++ b/Ports/CLDC11/src/java/text/DateFormatSymbols.java
@@ -25,10 +25,7 @@
import java.util.Hashtable;
import java.util.TimeZone;
-/**
- * @author Eric Coolman
- *
- */
+/// @author Eric Coolman
public class DateFormatSymbols implements Cloneable {
static final int ZONE_ID = 0;
static final int ZONE_LONGNAME = 1;
diff --git a/Ports/CLDC11/src/java/text/Format.java b/Ports/CLDC11/src/java/text/Format.java
index 2a5b97c075..047ea37987 100644
--- a/Ports/CLDC11/src/java/text/Format.java
+++ b/Ports/CLDC11/src/java/text/Format.java
@@ -22,28 +22,41 @@
*/
package java.text;
-/**
- * An abstract class for parsing and formatting localisation sensitive information, compatible with JDK 6.
- *
- * @see http://docs.oracle.com/javase/6/docs/api/java/text/Format.html
- * @author Eric Coolman
- */
+/// An abstract class for parsing and formatting localisation sensitive information, compatible with JDK 6.
+///
+/// @author Eric Coolman
+///
+/// #### See also
+///
+/// - [http://docs.oracle.com/javase/6/docs/api/java/text/Format.html](http://docs.oracle.com/javase/6/docs/api/java/text/Format.html)
public abstract class Format implements Cloneable {
- /**
- * Format an object.
- *
- * @param source object to be formatted to text.
- * @return formatted text.
- * @throws IllegalArgumentException if the source can not be formatted.
- */
+ /// Format an object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: object to be formatted to text.
+ ///
+ /// #### Returns
+ ///
+ /// formatted text.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if the source can not be formatted.
public abstract String format(Object source) throws IllegalArgumentException;
- /**
- * Parse an string to an object.
- *
- * @param source document to be parsed.
- * @return parsed object.
- * @throws ParseException if the source could not be parsed.
- */
+ /// Parse an string to an object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: document to be parsed.
+ ///
+ /// #### Returns
+ ///
+ /// parsed object.
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
public abstract Object parseObject(String source) throws ParseException;
}
\ No newline at end of file
diff --git a/Ports/CLDC11/src/java/text/ParseException.java b/Ports/CLDC11/src/java/text/ParseException.java
index 835d678a6e..ffa2965511 100644
--- a/Ports/CLDC11/src/java/text/ParseException.java
+++ b/Ports/CLDC11/src/java/text/ParseException.java
@@ -22,43 +22,40 @@
*/
package java.text;
-/**
- * An error occurred during parsing.
- *
- * @author Eric Coolman
- *
- */
+/// An error occurred during parsing.
+///
+/// @author Eric Coolman
public class ParseException extends Exception {
private int errorOffset;
private Throwable causedBy;
- /**
- * @param errorOffset
- */
+ /// #### Parameters
+ ///
+ /// - `errorOffset`
public ParseException(String s, int errorOffset) {
super(s);
this.errorOffset = errorOffset;
}
- /**
- * @param errorOffset
- */
+ /// #### Parameters
+ ///
+ /// - `errorOffset`
ParseException(Throwable causedBy, String s, int errorOffset) {
super((s == null && causedBy != null) ? causedBy.getMessage() : s);
this.causedBy = causedBy;
this.errorOffset = errorOffset;
}
- /**
- * @return the errorOffset
- */
+ /// #### Returns
+ ///
+ /// the errorOffset
public int getErrorOffset() {
return errorOffset;
}
- /**
- * @return the causedBy
- */
+ /// #### Returns
+ ///
+ /// the causedBy
Throwable getCausedBy() {
return causedBy;
}
diff --git a/Ports/CLDC11/src/java/text/SimpleDateFormat.java b/Ports/CLDC11/src/java/text/SimpleDateFormat.java
index 46e9c519a4..82437143db 100644
--- a/Ports/CLDC11/src/java/text/SimpleDateFormat.java
+++ b/Ports/CLDC11/src/java/text/SimpleDateFormat.java
@@ -28,178 +28,118 @@
import java.util.TimeZone;
import java.util.Vector;
-/**
- * A class for parsing and formatting dates with a given pattern, compatible
- * with the Java 6 API.
- *
- * @see http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html
- * @author Eric Coolman
- * @deprecated this class has many issues in iOS and other platforms, please use the L10NManager
- */
+/// A class for parsing and formatting dates with a given pattern, compatible
+/// with the Java 6 API.
+///
+/// @author Eric Coolman
+///
+/// #### Deprecated
+///
+/// this class has many issues in iOS and other platforms, please use the L10NManager
+///
+/// #### See also
+///
+/// - [http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html](http://docs.oracle.com/javase/6/docs/api/java/text/DateFormat.html)
public class SimpleDateFormat extends DateFormat {
- /**
- * Pattern character for ERA (ie. BC, AD).
- */
+ /// Pattern character for ERA (ie. BC, AD).
private static final char ERA_LETTER = 'G';
- /**
- * Pattern character for year.
- */
+ /// Pattern character for year.
private static final char YEAR_LETTER = 'y';
- /**
- * Pattern character for month.
- */
+ /// Pattern character for month.
private static final char MONTH_LETTER = 'M';
- /**
- * Pattern character for week in year.
- */
+ /// Pattern character for week in year.
private static final char WEEK_IN_YEAR_LETTER = 'w';
- /**
- * Pattern character for week in month.
- */
+ /// Pattern character for week in month.
private static final char WEEK_IN_MONTH_LETTER = 'W';
- /**
- * Pattern character for day in year.
- */
+ /// Pattern character for day in year.
private static final char DAY_IN_YEAR_LETTER = 'D';
- /**
- * Pattern character for day.
- */
+ /// Pattern character for day.
private static final char DAY_LETTER = 'd';
- /**
- * Pattern character for day-of-week in month.
- */
+ /// Pattern character for day-of-week in month.
private static final char DOW_IN_MONTH_LETTER = 'F';
- /**
- * Pattern character for day of week.
- */
+ /// Pattern character for day of week.
private static final char DAY_OF_WEEK_LETTER = 'E';
- /**
- * Pattern character for am/pm.
- */
+ /// Pattern character for am/pm.
private static final char AMPM_LETTER = 'a';
- /**
- * Pattern character for hour (0-23).
- */
+ /// Pattern character for hour (0-23).
private static final char HOUR_LETTER = 'H';
- /**
- * Pattern character for 1-based hour (1-24).
- */
+ /// Pattern character for 1-based hour (1-24).
private static final char HOUR_1_LETTER = 'k';
- /**
- * Pattern character for 12-hour (0-11).
- */
+ /// Pattern character for 12-hour (0-11).
private static final char HOUR12_LETTER = 'K';
- /**
- * Pattern character for 1-based 12-hour (1-12).
- */
+ /// Pattern character for 1-based 12-hour (1-12).
private static final char HOUR12_1_LETTER = 'h';
- /**
- * Pattern character for minute.
- */
+ /// Pattern character for minute.
private static final char MINUTE_LETTER = 'm';
- /**
- * Pattern character for second.
- */
+ /// Pattern character for second.
private static final char SECOND_LETTER = 's';
- /**
- * Pattern character for millisecond.
- */
+ /// Pattern character for millisecond.
private static final char MILLISECOND_LETTER = 'S';
- /**
- * Pattern character for general timezone.
- */
+ /// Pattern character for general timezone.
private static final char TIMEZONE_LETTER = 'z';
- /**
- * Pattern character for RFC 822-style timezone.
- */
+ /// Pattern character for RFC 822-style timezone.
private static final char TIMEZONE822_LETTER = 'Z';
- /**
- * Internally used character for literal text.
- */
+ /// Internally used character for literal text.
private static final char LITERAL_LETTER = '*';
- /**
- * Pattern character for starting/ending literal text explicitly in pattern.
- */
+ /// Pattern character for starting/ending literal text explicitly in pattern.
private static final char EXPLICIT_LITERAL = '\'';
- /**
- * positive sign
- */
+ /// positive sign
private static final char SIGN_POSITIVE = '+';
- /**
- * negative sign
- */
+ /// negative sign
private static final char SIGN_NEGATIVE = '-';
- /**
- * The number of milliseconds in a minute.
- */
+ /// The number of milliseconds in a minute.
private static final int MILLIS_TO_MINUTES = 60000;
- /**
- * Pattern characters recognised by this implementation (same as JDK 1.6).
- */
+ /// Pattern characters recognised by this implementation (same as JDK 1.6).
private static final String PATTERN_LETTERS = "adDEFGHhKkMmsSwWyzZ";
- /**
- * TimeZone ID for Greenwich Mean Time
- */
+ /// TimeZone ID for Greenwich Mean Time
private static final String GMT = "GMT";
- /**
- * This is missing from the Codename One Calendar object, but required by
- * TimeZone.getOffset()
- */
+ /// This is missing from the Codename One Calendar object, but required by
+ /// TimeZone.getOffset()
private static final int ERA = 0;
- /**
- * More missing from the calendar object - being lower field values, it is
- * likely they do exist on the devices Calendar object, if they don't, certain
- * lesser-used letters will not work in a pattern.
- */
+ /// More missing from the calendar object - being lower field values, it is
+ /// likely they do exist on the devices Calendar object, if they don't, certain
+ /// lesser-used letters will not work in a pattern.
private static final int WEEK_OF_MONTH = 4;
private static final int WEEK_OF_YEAR = 3;
private static final int DAY_OF_WEEK_IN_MONTH = 8;
private static final int DAY_OF_YEAR = 6;
- /**
- * Localisation sensitive symbols used for handling text components.
- */
+ /// Localisation sensitive symbols used for handling text components.
private DateFormatSymbols dateFormatSymbols;
- /**
- * The user-supplied pattern
- */
+ /// The user-supplied pattern
private String pattern;
- /**
- * The parsed pattern
- */
+ /// The parsed pattern
private List patternTokens;
- /**
- * Construct a SimpleDateFormat with no pattern.
- */
+ /// Construct a SimpleDateFormat with no pattern.
public SimpleDateFormat() {
super();
}
- /**
- * Construct a SimpleDateFormat with a given pattern.
- *
- * @param pattern
- */
+ /// Construct a SimpleDateFormat with a given pattern.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pattern`
public SimpleDateFormat(String pattern) {
super();
this.pattern = pattern;
}
- /**
- * @return the pattern
- */
+ /// #### Returns
+ ///
+ /// the pattern
public String toPattern() {
return pattern;
}
- /**
- * Get the date format symbols for parsing/formatting textual components of
- * dates in a localization sensitive way.
- *
- * @return current symbols.
- */
+ /// Get the date format symbols for parsing/formatting textual components of
+ /// dates in a localization sensitive way.
+ ///
+ /// #### Returns
+ ///
+ /// current symbols.
public DateFormatSymbols getDateFormatSymbols() {
if (dateFormatSymbols == null) {
dateFormatSymbols = new DateFormatSymbols();
@@ -207,21 +147,21 @@ public DateFormatSymbols getDateFormatSymbols() {
return dateFormatSymbols;
}
- /**
- * Apply new date format symbols for parsing/formatting textual components
- * of dates in a localisation sensitive way.
- *
- * @param newSymbols new format symbols.
- */
+ /// Apply new date format symbols for parsing/formatting textual components
+ /// of dates in a localisation sensitive way.
+ ///
+ /// #### Parameters
+ ///
+ /// - `newSymbols`: new format symbols.
public void setDateFormatSymbols(DateFormatSymbols newSymbols) {
dateFormatSymbols = newSymbols;
}
- /**
- * Apply a new pattern.
- *
- * @param pattern the pattern to set
- */
+ /// Apply a new pattern.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pattern`: the pattern to set
public void applyPattern(String pattern) {
this.pattern = pattern;
if (patternTokens != null) {
@@ -230,11 +170,7 @@ public void applyPattern(String pattern) {
}
}
- /**
- * G
- *
- * @return
- */
+ /// G
List getPatternTokens() {
if (this.patternTokens == null) {
patternTokens = parseDatePattern(pattern);
@@ -534,52 +470,68 @@ public Date parse(String source) throws ParseException {
return calendar.getTime();
}
- /**
- * Parse a hour value. Depending on patternChar parameter, the hour can be
- * 0-23, 1-24, 0-11, or 1-12. The returned value will always be 0 based.
- *
- * @param year as a string.
- * @param offset the offset of original timestamp where marker started, for
- * error reporting.
- * @return full year.
- * @throws ParseException if the source could not be parsed.
- * @see http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
- */
+ /// Parse a hour value. Depending on patternChar parameter, the hour can be
+ /// 0-23, 1-24, 0-11, or 1-12. The returned value will always be 0 based.
+ ///
+ /// #### Parameters
+ ///
+ /// - `year`: as a string.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where marker started, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// full year.
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
+ ///
+ /// #### See also
+ ///
+ /// - [http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html](http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html)
int parseHour(String source, char patternChar, int offset) throws ParseException {
int min = (patternChar == HOUR_1_LETTER || patternChar == HOUR12_1_LETTER) ? 1 : 0;
int max = ((patternChar == HOUR_LETTER || patternChar == HOUR_1_LETTER) ? 23 : 11) + min;
return parseNumber(source, offset, "hour", min, max) - min;
}
- /**
- * Utility method to validate a number is within given range.
- */
+ /// Utility method to validate a number is within given range.
void validateNumber(int i, int ofs, String name, int min, int max) throws ParseException {
if (i < min || i > max) {
throwInvalid(name, ofs);
}
}
- /**
- * Utility method to keep parsing errors consistent.
- *
- * @param name name of the element being parsed when error occurred.
- * @param offset offset within the original timestamp where named element
- * beings.
- */
+ /// Utility method to keep parsing errors consistent.
+ ///
+ /// #### Parameters
+ ///
+ /// - `name`: name of the element being parsed when error occurred.
+ ///
+ /// - `offset`: @param offset offset within the original timestamp where named element
+ /// beings.
int throwInvalid(String name, int offset) throws ParseException {
throw new ParseException("Invalid " + name + " value", offset);
}
- /**
- * Parse a numeric value, validating against given min/max constraints.
- *
- * @param number as a string.
- * @param offset the offset of original timestamp where number starts, for
- * error reporting.
- * @return numeric value as an int
- * @throws ParseException if the source could not be parsed.
- */
+ /// Parse a numeric value, validating against given min/max constraints.
+ ///
+ /// #### Parameters
+ ///
+ /// - `number`: as a string.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where number starts, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// numeric value as an int
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
int parseNumber(String source, int ofs, String name, int min, int max) throws ParseException {
if (source == null) {
throwInvalid(name, ofs);
@@ -596,55 +548,67 @@ int parseNumber(String source, int ofs, String name, int min, int max) throws Pa
return v;
}
- /**
- * Determine the number of minutes to adjust the date for local DST. This
- * should provide a historically correct value, also accounting for changes
- * in GMT offset. See TimeZone javadoc for more details.
- *
- * @param calendar
- * @return
- */
+ /// Determine the number of minutes to adjust the date for local DST. This
+ /// should provide a historically correct value, also accounting for changes
+ /// in GMT offset. See TimeZone javadoc for more details.
+ ///
+ /// #### Parameters
+ ///
+ /// - `calendar`
int getDSTOffset(Calendar source) {
TimeZone localTimezone = Calendar.getInstance().getTimeZone();
int rawOffset = localTimezone.getRawOffset() / MILLIS_TO_MINUTES;
return getOffsetInMinutes(source, localTimezone) - rawOffset;
}
- /**
- * Get the offset from GMT for a given timezone.
- *
- * @param source
- * @param timezone
- * @return
- */
+ /// Get the offset from GMT for a given timezone.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`
+ ///
+ /// - `timezone`
int getOffsetInMinutes(Calendar source, TimeZone timezone) {
return timezone.getOffset(source.get(ERA), source.get(Calendar.YEAR), source.get(Calendar.MONTH),
source.get(Calendar.DAY_OF_MONTH), source.get(Calendar.DAY_OF_WEEK), source.get(Calendar.MILLISECOND))
/ MILLIS_TO_MINUTES;
}
- /**
- * Read an unparsable text string.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where text starts
- * @return the text
- */
+ /// Read an unparsable text string.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where text starts
+ ///
+ /// #### Returns
+ ///
+ /// the text
String readLiteral(String source, int ofs, String token) {
return source.substring(ofs, ofs + token.length());
}
- /**
- * Read the number. Does not attempt to parse.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where number starts
- * @param token the token currently being parsed
- * @param adjacent true if the number is adjacent to next field with no
- * literal separator.
- * @return the number as a string, or null if could not read.
- * @see #parseNumber(String, int, String, int, int)
- */
+ /// Read the number. Does not attempt to parse.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where number starts
+ ///
+ /// - `token`: the token currently being parsed
+ ///
+ /// - `adjacent`: @param adjacent true if the number is adjacent to next field with no
+ /// literal separator.
+ ///
+ /// #### Returns
+ ///
+ /// the number as a string, or null if could not read.
+ ///
+ /// #### See also
+ ///
+ /// - #parseNumber(String, int, String, int, int)
String readNumber(String source, int ofs, String token, boolean adjacent) {
if (adjacent) {
return source.substring(ofs, ofs + token.length());
@@ -663,21 +627,31 @@ String readNumber(String source, int ofs, String token, boolean adjacent) {
return source.substring(ofs);
}
- /**
- * Parse a year value. If the year is a two digit value, if the value is
- * within 20 years ahead of the current year, current century will be used
- * (ie. if current year is 2013, a value of "33" will return 2033),
- * otherwise previous century is used (ie. with current year of 2012, a
- * value of 97 will return "1997"). See Java 6 documentation for more
- * details of this algorithm.
- *
- * @param year as a string.
- * @param offset the offset of original timestamp where marker started, for
- * error reporting.
- * @return full year.
- * @throws ParseException if the source could not be parsed.
- * @see http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html
- */
+ /// Parse a year value. If the year is a two digit value, if the value is
+ /// within 20 years ahead of the current year, current century will be used
+ /// (ie. if current year is 2013, a value of "33" will return 2033),
+ /// otherwise previous century is used (ie. with current year of 2012, a
+ /// value of 97 will return "1997"). See Java 6 documentation for more
+ /// details of this algorithm.
+ ///
+ /// #### Parameters
+ ///
+ /// - `year`: as a string.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where marker started, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// full year.
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
+ ///
+ /// #### See also
+ ///
+ /// - [http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html](http://docs.oracle.com/javase/6/docs/api/java/text/SimpleDateFormat.html)
int parseYear(String source, String token, int ofs) throws ParseException {
int year = parseNumber(source, ofs, "year", -1, -1);
int len = source.length();
@@ -694,13 +668,17 @@ int parseYear(String source, String token, int ofs) throws ParseException {
return year;
}
- /**
- * Read the day of week string. Does not attempt to parse.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where day of week starts
- * @return the day of week as a string, or null if could not read.
- */
+ /// Read the day of week string. Does not attempt to parse.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where day of week starts
+ ///
+ /// #### Returns
+ ///
+ /// the day of week as a string, or null if could not read.
String readDayOfWeek(String source, int ofs) {
int i = findEndText(source, ofs);
if (i == -1) {
@@ -720,14 +698,21 @@ String readDayOfWeek(String source, int ofs) {
return null;
}
- /**
- * Read the am/pm marker string. Does not attempt to parse.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where marker starts
- * @return the marker as a string, or null if could not read.
- * @see #parseAmPmMarker(String, int)
- */
+ /// Read the am/pm marker string. Does not attempt to parse.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where marker starts
+ ///
+ /// #### Returns
+ ///
+ /// the marker as a string, or null if could not read.
+ ///
+ /// #### See also
+ ///
+ /// - #parseAmPmMarker(String, int)
String readAmPmMarker(String source, int ofs) {
int i = findEndText(source, ofs);
if (i == -1) {
@@ -748,17 +733,27 @@ String readAmPmMarker(String source, int ofs) {
return null;
}
- /**
- * Parse an AM/PM marker. The source marker can be the marker name as
- * defined in DateFormatSymbols, or the first character of the marker name.
- *
- * @param month as a string.
- * @param offset the offset of original timestamp where marker started, for
- * error reporting.
- * @return Calendar.AM or Calendar.PM
- * @see DateFormatSymbols
- * @throws ParseException if the source could not be parsed.
- */
+ /// Parse an AM/PM marker. The source marker can be the marker name as
+ /// defined in DateFormatSymbols, or the first character of the marker name.
+ ///
+ /// #### Parameters
+ ///
+ /// - `month`: as a string.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where marker started, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// Calendar.AM or Calendar.PM
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
+ ///
+ /// #### See also
+ ///
+ /// - DateFormatSymbols
int parseAmPmMarker(String source, int ofs) throws ParseException {
String markers[] = getDateFormatSymbols().getAmPmStrings();
for (int i = 0; i < markers.length; i++) {
@@ -776,14 +771,21 @@ int parseAmPmMarker(String source, int ofs) throws ParseException {
return throwInvalid("am/pm marker", ofs);
}
- /**
- * Read the month string. Does not attempt to parse.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where month starts
- * @return the month as a string, or null if could not read.
- * @see #parseMonth(String, int)
- */
+ /// Read the month string. Does not attempt to parse.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where month starts
+ ///
+ /// #### Returns
+ ///
+ /// the month as a string, or null if could not read.
+ ///
+ /// #### See also
+ ///
+ /// - #parseMonth(String, int)
String readMonth(String source, int ofs, String token, boolean adjacent) {
if (token.length() < 3) {
if (adjacent) {
@@ -811,18 +813,28 @@ String readMonth(String source, int ofs, String token, boolean adjacent) {
return null;
}
- /**
- * Parse a month value to an offset from Calendar.JANUARY. The source month
- * value can be numeric (1-12), a shortform or longform month name as
- * defined in DateFormatSymbols.
- *
- * @param month as a string.
- * @param offset the offset of original timestamp where month started, for
- * error reporting.
- * @return month as an offset from Calendar.JANUARY.
- * @see DateFormatSymbols
- * @throws ParseException if the source could not be parsed.
- */
+ /// Parse a month value to an offset from Calendar.JANUARY. The source month
+ /// value can be numeric (1-12), a shortform or longform month name as
+ /// defined in DateFormatSymbols.
+ ///
+ /// #### Parameters
+ ///
+ /// - `month`: as a string.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where month started, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// month as an offset from Calendar.JANUARY.
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
+ ///
+ /// #### See also
+ ///
+ /// - DateFormatSymbols
int parseMonth(String month, int offset) throws ParseException {
if (month.length() < 3) {
return (parseNumber(month, offset, "month", 1, 12) - 1) + Calendar.JANUARY;
@@ -842,14 +854,21 @@ int parseMonth(String month, int offset) throws ParseException {
return throwInvalid("month", offset);
}
- /**
- * Read the timezone string. Does not attempt to parse.
- *
- * @param source full timestamp
- * @param ofs offset within timestamp where timezone starts
- * @return the timezone as a string or null if error reading.
- * @see #parseTimeZone(String)
- */
+ /// Read the timezone string. Does not attempt to parse.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: full timestamp
+ ///
+ /// - `ofs`: offset within timestamp where timezone starts
+ ///
+ /// #### Returns
+ ///
+ /// the timezone as a string or null if error reading.
+ ///
+ /// #### See also
+ ///
+ /// - #parseTimeZone(String)
String readTimeZone(String source, int ofs) {
int sp = source.indexOf(' ', ofs);
String fragment;
@@ -881,17 +900,24 @@ String readTimeZone(String source, int ofs) {
return null;
}
- /**
- * Parse the timezone to an offset from GMT in minutes. The source can be
- * RFC-822 (ie. -0400), ISO8601 (ie. GMT+08:50), or TimeZone ID (ie. PDT,
- * America/New_York, etc). This method does not adjust for DST.
- *
- * @param source source timezone.
- * @param offset the offset of original timestamp where month started, for
- * error reporting.
- * @return offset from GMT in minutes.
- * @throws ParseException if the source could not be parsed.
- */
+ /// Parse the timezone to an offset from GMT in minutes. The source can be
+ /// RFC-822 (ie. -0400), ISO8601 (ie. GMT+08:50), or TimeZone ID (ie. PDT,
+ /// America/New_York, etc). This method does not adjust for DST.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: source timezone.
+ ///
+ /// - `offset`: @param offset the offset of original timestamp where month started, for
+ /// error reporting.
+ ///
+ /// #### Returns
+ ///
+ /// offset from GMT in minutes.
+ ///
+ /// #### Throws
+ ///
+ /// - `ParseException`: if the source could not be parsed.
int parseTimeZone(String source, int ofs) throws ParseException {
char tzSign = source.charAt(0);
// handle RFC822 style GMT offset (-0500)
@@ -934,13 +960,17 @@ int parseTimeZone(String source, int ofs) throws ParseException {
return throwInvalid("timezone", ofs);
}
- /**
- * Attempt to find the end of a field if the length is not known.
- *
- * @param source the full source timestamp
- * @param ofs index of where current field starts.
- * @return the index of the end of field, or -1 if couldn't determine.
- */
+ /// Attempt to find the end of a field if the length is not known.
+ ///
+ /// #### Parameters
+ ///
+ /// - `source`: the full source timestamp
+ ///
+ /// - `ofs`: index of where current field starts.
+ ///
+ /// #### Returns
+ ///
+ /// the index of the end of field, or -1 if couldn't determine.
int findEndText(String source, int ofs) {
for (int i = ofs; i < source.length(); i++) {
if (isAlpha(source.charAt(i)) == false && isNumeric(source.charAt(i)) == false) {
@@ -950,30 +980,29 @@ int findEndText(String source, int ofs) {
return -1;
}
- /**
- * Test if a character is alpha (A-Z,a-z).
- */
+ /// Test if a character is alpha (A-Z,a-z).
boolean isAlpha(char ch) {
return ((ch >= 'A' && ch <= 'Z') || (ch >= 'a' && ch <= 'z'));
}
- /**
- * Test if a character is number (0-9).
- */
+ /// Test if a character is number (0-9).
boolean isNumeric(char ch) {
return (ch >= '0' && ch <= '9');
}
- /**
- * Parse the date pattern.
- *
- * The list will contain each token of the pattern. The first character of
- * the token contains the pattern component type, or wildcard (*) for
- * literal patterns.
- *
- * @param pattern
- * @return parsed pattern.
- */
+ /// Parse the date pattern.
+ ///
+ /// The list will contain each token of the pattern. The first character of
+ /// the token contains the pattern component type, or wildcard (*) for
+ /// literal patterns.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pattern`
+ ///
+ /// #### Returns
+ ///
+ /// parsed pattern.
List parseDatePattern(String pattern) {
List tokens = new Vector();
String tmp = null;
diff --git a/Ports/CLDC11/src/java/util/AbstractCollection.java b/Ports/CLDC11/src/java/util/AbstractCollection.java
index 658ffcdb1a..100913af1e 100644
--- a/Ports/CLDC11/src/java/util/AbstractCollection.java
+++ b/Ports/CLDC11/src/java/util/AbstractCollection.java
@@ -17,20 +17,16 @@
package java.util;
-/**
- * Class {@code AbstractCollection} is an abstract implementation of the {@code
- * Collection} interface. A subclass must implement the abstract methods {@code
- * iterator()} and {@code size()} to create an immutable collection. To create a
- * modifiable collection it's necessary to override the {@code add()} method that
- * currently throws an {@code UnsupportedOperationException}.
- *
- * @since 1.2
- */
+/// Class `AbstractCollection` is an abstract implementation of the `Collection` interface. A subclass must implement the abstract methods `iterator()` and `size()` to create an immutable collection. To create a
+/// modifiable collection it's necessary to override the `add()` method that
+/// currently throws an `UnsupportedOperationException`.
+///
+/// #### Since
+///
+/// 1.2
public abstract class AbstractCollection implements Collection {
- /**
- * Constructs a new instance of this AbstractCollection.
- */
+ /// Constructs a new instance of this AbstractCollection.
protected AbstractCollection() {
super();
}
@@ -39,35 +35,40 @@ public boolean add(E object) {
throw new UnsupportedOperationException();
}
- /**
- * Attempts to add all of the objects contained in {@code collection}
- * to the contents of this {@code Collection} (optional). This implementation
- * iterates over the given {@code Collection} and calls {@code add} for each
- * element. If any of these calls return {@code true}, then {@code true} is
- * returned as result of this method call, {@code false} otherwise. If this
- * {@code Collection} does not support adding elements, an {@code
- * UnsupportedOperationException} is thrown.
- *
- * If the passed {@code Collection} is changed during the process of adding elements
- * to this {@code Collection}, the behavior depends on the behavior of the passed
- * {@code Collection}.
- *
- * @param collection
- * the collection of objects.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if adding to this {@code Collection} is not supported.
- * @throws ClassCastException
- * if the class of an object is inappropriate for this
- * {@code Collection}.
- * @throws IllegalArgumentException
- * if an object cannot be added to this {@code Collection}.
- * @throws NullPointerException
- * if {@code collection} is {@code null}, or if it contains
- * {@code null} elements and this {@code Collection} does not support
- * such elements.
- */
+ /// Attempts to add all of the objects contained in `collection`
+ /// to the contents of this `Collection` (optional). This implementation
+ /// iterates over the given `Collection` and calls `add` for each
+ /// element. If any of these calls return `true`, then `true` is
+ /// returned as result of this method call, `false` otherwise. If this
+ /// `Collection` does not support adding elements, an `UnsupportedOperationException` is thrown.
+ ///
+ /// If the passed `Collection` is changed during the process of adding elements
+ /// to this `Collection`, the behavior depends on the behavior of the passed
+ /// `Collection`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of an object is inappropriate for this
+ /// `Collection`.
+ ///
+ /// - `IllegalArgumentException`: if an object cannot be added to this `Collection`.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` is `null`, or if it contains
+ /// `null` elements and this `Collection` does not support
+ /// such elements.
public boolean addAll(Collection extends E> collection) {
boolean result = false;
Iterator extends E> it = collection.iterator();
@@ -79,22 +80,26 @@ public boolean addAll(Collection extends E> collection) {
return result;
}
- /**
- * Removes all elements from this {@code Collection}, leaving it empty (optional).
- * This implementation iterates over this {@code Collection} and calls the {@code
- * remove} method on each element. If the iterator does not support removal
- * of elements, an {@code UnsupportedOperationException} is thrown.
- *
- * Concrete implementations usually can clear a {@code Collection} more efficiently
- * and should therefore overwrite this method.
- *
- * @throws UnsupportedOperationException
- * it the iterator does not support removing elements from
- * this {@code Collection}
- * @see #iterator
- * @see #isEmpty
- * @see #size
- */
+ /// Removes all elements from this `Collection`, leaving it empty (optional).
+ /// This implementation iterates over this `Collection` and calls the `remove` method on each element. If the iterator does not support removal
+ /// of elements, an `UnsupportedOperationException` is thrown.
+ ///
+ /// Concrete implementations usually can clear a `Collection` more efficiently
+ /// and should therefore overwrite this method.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: @throws UnsupportedOperationException
+ /// it the iterator does not support removing elements from
+ /// this `Collection`
+ ///
+ /// #### See also
+ ///
+ /// - #iterator
+ ///
+ /// - #isEmpty
+ ///
+ /// - #size
public void clear() {
Iterator it = iterator();
while (it.hasNext()) {
@@ -103,25 +108,29 @@ public void clear() {
}
}
- /**
- * Tests whether this {@code Collection} contains the specified object. This
- * implementation iterates over this {@code Collection} and tests, whether any
- * element is equal to the given object. If {@code object != null} then
- * {@code object.equals(e)} is called for each element {@code e} returned by
- * the iterator until the element is found. If {@code object == null} then
- * each element {@code e} returned by the iterator is compared with the test
- * {@code e == null}.
- *
- * @param object
- * the object to search for.
- * @return {@code true} if object is an element of this {@code Collection}, {@code
- * false} otherwise.
- * @throws ClassCastException
- * if the object to look for isn't of the correct type.
- * @throws NullPointerException
- * if the object to look for is {@code null} and this
- * {@code Collection} doesn't support {@code null} elements.
- */
+ /// Tests whether this `Collection` contains the specified object. This
+ /// implementation iterates over this `Collection` and tests, whether any
+ /// element is equal to the given object. If `object != null` then
+ /// `object.equals(e)` is called for each element `e` returned by
+ /// the iterator until the element is found. If `object == null` then
+ /// each element `e` returned by the iterator is compared with the test
+ /// `e == null`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to search for.
+ ///
+ /// #### Returns
+ ///
+ /// `true` if object is an element of this `Collection`, `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: if the object to look for isn't of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if the object to look for is `null` and this
+ /// `Collection` doesn't support `null` elements.
public boolean contains(Object object) {
Iterator it = iterator();
if (object != null) {
@@ -140,26 +149,32 @@ public boolean contains(Object object) {
return false;
}
- /**
- * Tests whether this {@code Collection} contains all objects contained in the
- * specified {@code Collection}. This implementation iterates over the specified
- * {@code Collection}. If one element returned by the iterator is not contained in
- * this {@code Collection}, then {@code false} is returned; {@code true} otherwise.
- *
- * @param collection
- * the collection of objects.
- * @return {@code true} if all objects in the specified {@code Collection} are
- * elements of this {@code Collection}, {@code false} otherwise.
- * @throws ClassCastException
- * if one or more elements of {@code collection} isn't of the
- * correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one {@code null}
- * element and this {@code Collection} doesn't support {@code null}
- * elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Tests whether this `Collection` contains all objects contained in the
+ /// specified `Collection`. This implementation iterates over the specified
+ /// `Collection`. If one element returned by the iterator is not contained in
+ /// this `Collection`, then `false` is returned; `true` otherwise.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if all objects in the specified `Collection` are
+ /// elements of this `Collection`, `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection` isn't of the
+ /// correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one `null`
+ /// element and this `Collection` doesn't support `null`
+ /// elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean containsAll(Collection> collection) {
Iterator> it = collection.iterator();
while (it.hasNext()) {
@@ -170,56 +185,63 @@ public boolean containsAll(Collection> collection) {
return true;
}
- /**
- * Returns if this {@code Collection} contains no elements. This implementation
- * tests, whether {@code size} returns 0.
- *
- * @return {@code true} if this {@code Collection} has no elements, {@code false}
- * otherwise.
- *
- * @see #size
- */
+ /// Returns if this `Collection` contains no elements. This implementation
+ /// tests, whether `size` returns 0.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` has no elements, `false`
+ /// otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - #size
public boolean isEmpty() {
return size() == 0;
}
- /**
- * Returns an instance of {@link Iterator} that may be used to access the
- * objects contained by this {@code Collection}. The order in which the elements are
- * returned by the {@link Iterator} is not defined unless the instance of the
- * {@code Collection} has a defined order. In that case, the elements are returned in that order.
- *
- * In this class this method is declared abstract and has to be implemented
- * by concrete {@code Collection} implementations.
- *
- * @return an iterator for accessing the {@code Collection} contents.
- */
+ /// Returns an instance of `Iterator` that may be used to access the
+ /// objects contained by this `Collection`. The order in which the elements are
+ /// returned by the `Iterator` is not defined unless the instance of the
+ /// `Collection` has a defined order. In that case, the elements are returned in that order.
+ ///
+ /// In this class this method is declared abstract and has to be implemented
+ /// by concrete `Collection` implementations.
+ ///
+ /// #### Returns
+ ///
+ /// an iterator for accessing the `Collection` contents.
public abstract Iterator iterator();
- /**
- * Removes one instance of the specified object from this {@code Collection} if one
- * is contained (optional). This implementation iterates over this
- * {@code Collection} and tests for each element {@code e} returned by the iterator,
- * whether {@code e} is equal to the given object. If {@code object != null}
- * then this test is performed using {@code object.equals(e)}, otherwise
- * using {@code object == null}. If an element equal to the given object is
- * found, then the {@code remove} method is called on the iterator and
- * {@code true} is returned, {@code false} otherwise. If the iterator does
- * not support removing elements, an {@code UnsupportedOperationException}
- * is thrown.
- *
- * @param object
- * the object to remove.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if the object passed is not of the correct type.
- * @throws NullPointerException
- * if {@code object} is {@code null} and this {@code Collection}
- * doesn't support {@code null} elements.
- */
+ /// Removes one instance of the specified object from this `Collection` if one
+ /// is contained (optional). This implementation iterates over this
+ /// `Collection` and tests for each element `e` returned by the iterator,
+ /// whether `e` is equal to the given object. If `object != null`
+ /// then this test is performed using `object.equals(e)`, otherwise
+ /// using `object == null`. If an element equal to the given object is
+ /// found, then the `remove` method is called on the iterator and
+ /// `true` is returned, `false` otherwise. If the iterator does
+ /// not support removing elements, an `UnsupportedOperationException`
+ /// is thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: if the object passed is not of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `object` is `null` and this `Collection`
+ /// doesn't support `null` elements.
public boolean remove(Object object) {
Iterator> it = iterator();
if (object != null) {
@@ -240,35 +262,40 @@ public boolean remove(Object object) {
return false;
}
- /**
- * Removes all occurrences in this {@code Collection} of each object in the
- * specified {@code Collection} (optional). After this method returns none of the
- * elements in the passed {@code Collection} can be found in this {@code Collection}
- * anymore.
- *
- * This implementation iterates over this {@code Collection} and tests for each
- * element {@code e} returned by the iterator, whether it is contained in
- * the specified {@code Collection}. If this test is positive, then the {@code
- * remove} method is called on the iterator. If the iterator does not
- * support removing elements, an {@code UnsupportedOperationException} is
- * thrown.
- *
- * @param collection
- * the collection of objects to remove.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if one or more elements of {@code collection} isn't of the
- * correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one {@code null}
- * element and this {@code Collection} doesn't support {@code null}
- * elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Removes all occurrences in this `Collection` of each object in the
+ /// specified `Collection` (optional). After this method returns none of the
+ /// elements in the passed `Collection` can be found in this `Collection`
+ /// anymore.
+ ///
+ /// This implementation iterates over this `Collection` and tests for each
+ /// element `e` returned by the iterator, whether it is contained in
+ /// the specified `Collection`. If this test is positive, then the `remove` method is called on the iterator. If the iterator does not
+ /// support removing elements, an `UnsupportedOperationException` is
+ /// thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection` isn't of the
+ /// correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one `null`
+ /// element and this `Collection` doesn't support `null`
+ /// elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean removeAll(Collection> collection) {
boolean result = false;
Iterator> it = iterator();
@@ -281,35 +308,40 @@ public boolean removeAll(Collection> collection) {
return result;
}
- /**
- * Removes all objects from this {@code Collection} that are not also found in the
- * {@code Collection} passed (optional). After this method returns this {@code Collection}
- * will only contain elements that also can be found in the {@code Collection}
- * passed to this method.
- *
- * This implementation iterates over this {@code Collection} and tests for each
- * element {@code e} returned by the iterator, whether it is contained in
- * the specified {@code Collection}. If this test is negative, then the {@code
- * remove} method is called on the iterator. If the iterator does not
- * support removing elements, an {@code UnsupportedOperationException} is
- * thrown.
- *
- * @param collection
- * the collection of objects to retain.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if one or more elements of {@code collection}
- * isn't of the correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one
- * {@code null} element and this {@code Collection} doesn't support
- * {@code null} elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Removes all objects from this `Collection` that are not also found in the
+ /// `Collection` passed (optional). After this method returns this `Collection`
+ /// will only contain elements that also can be found in the `Collection`
+ /// passed to this method.
+ ///
+ /// This implementation iterates over this `Collection` and tests for each
+ /// element `e` returned by the iterator, whether it is contained in
+ /// the specified `Collection`. If this test is negative, then the `remove` method is called on the iterator. If the iterator does not
+ /// support removing elements, an `UnsupportedOperationException` is
+ /// thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects to retain.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection`
+ /// isn't of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one
+ /// `null` element and this `Collection` doesn't support
+ /// `null` elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean retainAll(Collection> collection) {
boolean result = false;
Iterator> it = iterator();
@@ -322,25 +354,25 @@ public boolean retainAll(Collection> collection) {
return result;
}
- /**
- * Returns a count of how many objects this {@code Collection} contains.
- *
- * In this class this method is declared abstract and has to be implemented
- * by concrete {@code Collection} implementations.
- *
- * @return how many objects this {@code Collection} contains, or {@code Integer.MAX_VALUE}
- * if there are more than {@code Integer.MAX_VALUE} elements in this
- * {@code Collection}.
- */
+ /// Returns a count of how many objects this `Collection` contains.
+ ///
+ /// In this class this method is declared abstract and has to be implemented
+ /// by concrete `Collection` implementations.
+ ///
+ /// #### Returns
+ ///
+ /// @return how many objects this `Collection` contains, or `Integer.MAX_VALUE`
+ /// if there are more than `Integer.MAX_VALUE` elements in this
+ /// `Collection`.
public abstract int size();
- /**
- * Returns the string representation of this {@code Collection}. The presentation
- * has a specific format. It is enclosed by square brackets ("[]"). Elements
- * are separated by ', ' (comma and space).
- *
- * @return the string representation of this {@code Collection}.
- */
+ /// Returns the string representation of this `Collection`. The presentation
+ /// has a specific format. It is enclosed by square brackets ("[]"). Elements
+ /// are separated by ', ' (comma and space).
+ ///
+ /// #### Returns
+ ///
+ /// the string representation of this `Collection`.
@Override
public String toString() {
if (isEmpty()) {
@@ -366,32 +398,37 @@ public String toString() {
}
- /**
- * Returns a new array containing all elements contained in this
- * {@code ArrayList}.
- *
- * @return an array of the elements from this {@code ArrayList}
- */
+ /// Returns a new array containing all elements contained in this
+ /// `ArrayList`.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`
@Override
public Object[] toArray() {
return ArrayList.toObjectArray(this);
}
- /**
- * Returns an array containing all elements contained in this
- * {@code ArrayList}. If the specified array is large enough to hold the
- * elements, the specified array is used, otherwise an array of the same
- * type is created. If the specified array is used and is larger than this
- * {@code ArrayList}, the array element following the collection elements
- * is set to null.
- *
- * @param contents
- * the array.
- * @return an array of the elements from this {@code ArrayList}.
- * @throws ArrayStoreException
- * when the type of an element in this {@code ArrayList} cannot
- * be stored in the type of the specified array.
- */
+ /// Returns an array containing all elements contained in this
+ /// `ArrayList`. If the specified array is large enough to hold the
+ /// elements, the specified array is used, otherwise an array of the same
+ /// type is created. If the specified array is used and is larger than this
+ /// `ArrayList`, the array element following the collection elements
+ /// is set to null.
+ ///
+ /// #### Parameters
+ ///
+ /// - `contents`: the array.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayStoreException`: @throws ArrayStoreException
+ /// when the type of an element in this `ArrayList` cannot
+ /// be stored in the type of the specified array.
@Override
@SuppressWarnings("unchecked")
public T[] toArray(T[] contents) {
diff --git a/Ports/CLDC11/src/java/util/AbstractList.java b/Ports/CLDC11/src/java/util/AbstractList.java
index a398147ad0..f20812d46a 100644
--- a/Ports/CLDC11/src/java/util/AbstractList.java
+++ b/Ports/CLDC11/src/java/util/AbstractList.java
@@ -18,22 +18,20 @@
package java.util;
-/**
- * {@code AbstractList} is an abstract implementation of the {@code List} interface, optimized
- * for a backing store which supports random access. This implementation does
- * not support adding or replacing. A subclass must implement the abstract
- * methods {@code get()} and {@code size()}, and to create a
- * modifiable {@code List} it's necessary to override the {@code add()} method that
- * currently throws an {@code UnsupportedOperationException}.
- *
- * @since 1.2
- */
+/// `AbstractList` is an abstract implementation of the `List` interface, optimized
+/// for a backing store which supports random access. This implementation does
+/// not support adding or replacing. A subclass must implement the abstract
+/// methods `get()` and `size()`, and to create a
+/// modifiable `List` it's necessary to override the `add()` method that
+/// currently throws an `UnsupportedOperationException`.
+///
+/// #### Since
+///
+/// 1.2
public abstract class AbstractList extends AbstractCollection implements
List {
- /**
- * A counter for changes to the list.
- */
+ /// A counter for changes to the list.
protected transient int modCount;
private class SimpleListIterator implements Iterator {
@@ -369,82 +367,88 @@ void sizeChanged(boolean increment) {
}
}
- /**
- * Constructs a new instance of this AbstractList.
- */
+ /// Constructs a new instance of this AbstractList.
protected AbstractList() {
super();
}
- /**
- * Inserts the specified object into this List at the specified location.
- * The object is inserted before any previous element at the specified
- * location. If the location is equal to the size of this List, the object
- * is added at the end.
- *
- * Concrete implementations that would like to support the add functionality
- * must override this method.
- *
- * @param location
- * the index at which to insert.
- * @param object
- * the object to add.
- *
- * @throws UnsupportedOperationException
- * if adding to this List is not supported.
- * @throws ClassCastException
- * if the class of the object is inappropriate for this
- * List
- * @throws IllegalArgumentException
- * if the object cannot be added to this List
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || >= size()}
- */
+ /// Inserts the specified object into this List at the specified location.
+ /// The object is inserted before any previous element at the specified
+ /// location. If the location is equal to the size of this List, the object
+ /// is added at the end.
+ ///
+ /// Concrete implementations that would like to support the add functionality
+ /// must override this method.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to insert.
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this List is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of the object is inappropriate for this
+ /// List
+ ///
+ /// - `IllegalArgumentException`: if the object cannot be added to this List
+ ///
+ /// - `IndexOutOfBoundsException`: if `location = size()`
public void add(int location, E object) {
throw new UnsupportedOperationException();
}
- /**
- * Adds the specified object at the end of this List.
- *
- *
- * @param object
- * the object to add
- * @return true
- *
- * @throws UnsupportedOperationException
- * if adding to this List is not supported
- * @throws ClassCastException
- * if the class of the object is inappropriate for this
- * List
- * @throws IllegalArgumentException
- * if the object cannot be added to this List
- */
+ /// Adds the specified object at the end of this List.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to add
+ ///
+ /// #### Returns
+ ///
+ /// true
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this List is not supported
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of the object is inappropriate for this
+ /// List
+ ///
+ /// - `IllegalArgumentException`: if the object cannot be added to this List
@Override
public boolean add(E object) {
add(size(), object);
return true;
}
- /**
- * Inserts the objects in the specified Collection at the specified location
- * in this List. The objects are added in the order they are returned from
- * the collection's iterator.
- *
- * @param location
- * the index at which to insert.
- * @param collection
- * the Collection of objects
- * @return {@code true} if this List is modified, {@code false} otherwise.
- * @throws UnsupportedOperationException
- * if adding to this list is not supported.
- * @throws ClassCastException
- * if the class of an object is inappropriate for this list.
- * @throws IllegalArgumentException
- * if an object cannot be added to this list.
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || > size()}
- */
+ /// Inserts the objects in the specified Collection at the specified location
+ /// in this List. The objects are added in the order they are returned from
+ /// the collection's iterator.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to insert.
+ ///
+ /// - `collection`: the Collection of objects
+ ///
+ /// #### Returns
+ ///
+ /// `true` if this List is modified, `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this list is not supported.
+ ///
+ /// - `ClassCastException`: if the class of an object is inappropriate for this list.
+ ///
+ /// - `IllegalArgumentException`: if an object cannot be added to this list.
+ ///
+ /// - `IndexOutOfBoundsException`: if `location size()`
public boolean addAll(int location, Collection extends E> collection) {
Iterator extends E> it = collection.iterator();
while (it.hasNext()) {
@@ -453,30 +457,38 @@ public boolean addAll(int location, Collection extends E> collection) {
return !collection.isEmpty();
}
- /**
- * Removes all elements from this list, leaving it empty.
- *
- * @throws UnsupportedOperationException
- * if removing from this list is not supported.
- * @see List#isEmpty
- * @see List#size
- */
+ /// Removes all elements from this list, leaving it empty.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this list is not supported.
+ ///
+ /// #### See also
+ ///
+ /// - List#isEmpty
+ ///
+ /// - List#size
@Override
public void clear() {
removeRange(0, size());
}
- /**
- * Compares the specified object to this list and return true if they are
- * equal. Two lists are equal when they both contain the same objects in the
- * same order.
- *
- * @param object
- * the object to compare to this object.
- * @return {@code true} if the specified object is equal to this list,
- * {@code false} otherwise.
- * @see #hashCode
- */
+ /// Compares the specified object to this list and return true if they are
+ /// equal. Two lists are equal when they both contain the same objects in the
+ /// same order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to compare to this object.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the specified object is equal to this list,
+ /// `false` otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - #hashCode
@Override
public boolean equals(Object object) {
if (this == object) {
@@ -500,25 +512,33 @@ public boolean equals(Object object) {
return false;
}
- /**
- * Returns the element at the specified location in this list.
- *
- * @param location
- * the index of the element to return.
- * @return the element at the specified index.
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || >= size()}
- */
+ /// Returns the element at the specified location in this list.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index of the element to return.
+ ///
+ /// #### Returns
+ ///
+ /// the element at the specified index.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `location = size()`
public abstract E get(int location);
- /**
- * Returns the hash code of this list. The hash code is calculated by taking
- * each element's hashcode into account.
- *
- * @return the hash code.
- * @see #equals
- * @see List#hashCode()
- */
+ /// Returns the hash code of this list. The hash code is calculated by taking
+ /// each element's hashcode into account.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code.
+ ///
+ /// #### See also
+ ///
+ /// - #equals
+ ///
+ /// - List#hashCode()
@Override
public int hashCode() {
int result = 1;
@@ -530,15 +550,17 @@ public int hashCode() {
return result;
}
- /**
- * Searches this list for the specified object and returns the index of the
- * first occurrence.
- *
- * @param object
- * the object to search for.
- * @return the index of the first occurrence of the object, or -1 if it was
- * not found.
- */
+ /// Searches this list for the specified object and returns the index of the
+ /// first occurrence.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return the index of the first occurrence of the object, or -1 if it was
+ /// not found.
public int indexOf(Object object) {
ListIterator> it = listIterator();
if (object != null) {
@@ -557,27 +579,32 @@ public int indexOf(Object object) {
return -1;
}
- /**
- * Returns an iterator on the elements of this list. The elements are
- * iterated in the same order as they occur in the list.
- *
- * @return an iterator on the elements of this list.
- * @see Iterator
- */
+ /// Returns an iterator on the elements of this list. The elements are
+ /// iterated in the same order as they occur in the list.
+ ///
+ /// #### Returns
+ ///
+ /// an iterator on the elements of this list.
+ ///
+ /// #### See also
+ ///
+ /// - Iterator
@Override
public Iterator iterator() {
return new SimpleListIterator();
}
- /**
- * Searches this list for the specified object and returns the index of the
- * last occurrence.
- *
- * @param object
- * the object to search for.
- * @return the index of the last occurrence of the object, or -1 if the
- * object was not found.
- */
+ /// Searches this list for the specified object and returns the index of the
+ /// last occurrence.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return the index of the last occurrence of the object, or -1 if the
+ /// object was not found.
public int lastIndexOf(Object object) {
ListIterator> it = listIterator(size());
if (object != null) {
@@ -596,61 +623,76 @@ public int lastIndexOf(Object object) {
return -1;
}
- /**
- * Returns a ListIterator on the elements of this list. The elements are
- * iterated in the same order that they occur in the list.
- *
- * @return a ListIterator on the elements of this list
- * @see ListIterator
- */
+ /// Returns a ListIterator on the elements of this list. The elements are
+ /// iterated in the same order that they occur in the list.
+ ///
+ /// #### Returns
+ ///
+ /// a ListIterator on the elements of this list
+ ///
+ /// #### See also
+ ///
+ /// - ListIterator
public ListIterator listIterator() {
return listIterator(0);
}
- /**
- * Returns a list iterator on the elements of this list. The elements are
- * iterated in the same order as they occur in the list. The iteration
- * starts at the specified location.
- *
- * @param location
- * the index at which to start the iteration.
- * @return a ListIterator on the elements of this list.
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || location > size()}
- * @see ListIterator
- */
+ /// Returns a list iterator on the elements of this list. The elements are
+ /// iterated in the same order as they occur in the list. The iteration
+ /// starts at the specified location.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to start the iteration.
+ ///
+ /// #### Returns
+ ///
+ /// a ListIterator on the elements of this list.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `location size()`
+ ///
+ /// #### See also
+ ///
+ /// - ListIterator
public ListIterator listIterator(int location) {
return new FullListIterator(location);
}
- /**
- * Removes the object at the specified location from this list.
- *
- * @param location
- * the index of the object to remove.
- * @return the removed object.
- * @throws UnsupportedOperationException
- * if removing from this list is not supported.
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || >= size()}
- */
+ /// Removes the object at the specified location from this list.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index of the object to remove.
+ ///
+ /// #### Returns
+ ///
+ /// the removed object.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this list is not supported.
+ ///
+ /// - `IndexOutOfBoundsException`: if `location = size()`
public E remove(int location) {
throw new UnsupportedOperationException();
}
- /**
- * Removes the objects in the specified range from the start to the end
- * index minus one.
- *
- * @param start
- * the index at which to start removing.
- * @param end
- * the index after the last element to remove.
- * @throws UnsupportedOperationException
- * if removing from this list is not supported.
- * @throws IndexOutOfBoundsException
- * if {@code start < 0} or {@code start >= size()}.
- */
+ /// Removes the objects in the specified range from the start to the end
+ /// index minus one.
+ ///
+ /// #### Parameters
+ ///
+ /// - `start`: the index at which to start removing.
+ ///
+ /// - `end`: the index after the last element to remove.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this list is not supported.
+ ///
+ /// - `IndexOutOfBoundsException`: if `start = size()`.
protected void removeRange(int start, int end) {
Iterator> it = listIterator(start);
for (int i = start; i < end; i++) {
@@ -659,72 +701,80 @@ protected void removeRange(int start, int end) {
}
}
- /**
- * Replaces the element at the specified location in this list with the
- * specified object.
- *
- * @param location
- * the index at which to put the specified object.
- * @param object
- * the object to add.
- * @return the previous element at the index.
- * @throws UnsupportedOperationException
- * if replacing elements in this list is not supported.
- * @throws ClassCastException
- * if the class of an object is inappropriate for this list.
- * @throws IllegalArgumentException
- * if an object cannot be added to this list.
- * @throws IndexOutOfBoundsException
- * if {@code location < 0 || >= size()}
- */
+ /// Replaces the element at the specified location in this list with the
+ /// specified object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to put the specified object.
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Returns
+ ///
+ /// the previous element at the index.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if replacing elements in this list is not supported.
+ ///
+ /// - `ClassCastException`: if the class of an object is inappropriate for this list.
+ ///
+ /// - `IllegalArgumentException`: if an object cannot be added to this list.
+ ///
+ /// - `IndexOutOfBoundsException`: if `location = size()`
public E set(int location, E object) {
throw new UnsupportedOperationException();
}
- /**
- * Returns a part of consecutive elements of this list as a view. The
- * returned view will be of zero length if start equals end. Any change that
- * occurs in the returned subList will be reflected to the original list,
- * and vice-versa. All the supported optional operations by the original
- * list will also be supported by this subList.
- *
- * This method can be used as a handy method to do some operations on a sub
- * range of the original list, for example
- * {@code list.subList(from, to).clear();}
- *
- * If the original list is modified in other ways than through the returned
- * subList, the behavior of the returned subList becomes undefined.
- *
- * The returned subList is a subclass of AbstractList. The subclass stores
- * offset, size of itself, and modCount of the original list. If the
- * original list implements RandomAccess interface, the returned subList
- * also implements RandomAccess interface.
- *
- * The subList's set(int, Object), get(int), add(int, Object), remove(int),
- * addAll(int, Collection) and removeRange(int, int) methods first check the
- * bounds, adjust offsets and then call the corresponding methods of the
- * original AbstractList. addAll(Collection c) method of the returned
- * subList calls the original addAll(offset + size, c).
- *
- * The listIterator(int) method of the subList wraps the original list
- * iterator. The iterator() method of the subList invokes the original
- * listIterator() method, and the size() method merely returns the size of
- * the subList.
- *
- * All methods will throw a ConcurrentModificationException if the modCount
- * of the original list is not equal to the expected value.
- *
- * @param start
- * start index of the subList (inclusive).
- * @param end
- * end index of the subList, (exclusive).
- * @return a subList view of this list starting from {@code start}
- * (inclusive), and ending with {@code end} (exclusive)
- * @throws IndexOutOfBoundsException
- * if (start < 0 || end > size())
- * @throws IllegalArgumentException
- * if (start > end)
- */
+ /// Returns a part of consecutive elements of this list as a view. The
+ /// returned view will be of zero length if start equals end. Any change that
+ /// occurs in the returned subList will be reflected to the original list,
+ /// and vice-versa. All the supported optional operations by the original
+ /// list will also be supported by this subList.
+ ///
+ /// This method can be used as a handy method to do some operations on a sub
+ /// range of the original list, for example
+ /// `list.subList(from, to).clear();`
+ ///
+ /// If the original list is modified in other ways than through the returned
+ /// subList, the behavior of the returned subList becomes undefined.
+ ///
+ /// The returned subList is a subclass of AbstractList. The subclass stores
+ /// offset, size of itself, and modCount of the original list. If the
+ /// original list implements RandomAccess interface, the returned subList
+ /// also implements RandomAccess interface.
+ ///
+ /// The subList's set(int, Object), get(int), add(int, Object), remove(int),
+ /// addAll(int, Collection) and removeRange(int, int) methods first check the
+ /// bounds, adjust offsets and then call the corresponding methods of the
+ /// original AbstractList. addAll(Collection c) method of the returned
+ /// subList calls the original addAll(offset + size, c).
+ ///
+ /// The listIterator(int) method of the subList wraps the original list
+ /// iterator. The iterator() method of the subList invokes the original
+ /// listIterator() method, and the size() method merely returns the size of
+ /// the subList.
+ ///
+ /// All methods will throw a ConcurrentModificationException if the modCount
+ /// of the original list is not equal to the expected value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `start`: start index of the subList (inclusive).
+ ///
+ /// - `end`: end index of the subList, (exclusive).
+ ///
+ /// #### Returns
+ ///
+ /// @return a subList view of this list starting from `start`
+ /// (inclusive), and ending with `end` (exclusive)
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if (start size())
+ ///
+ /// - `IllegalArgumentException`: if (start > end)
public List subList(int start, int end) {
if (0 <= start && end <= size()) {
if (start <= end) {
@@ -738,12 +788,12 @@ public List subList(int start, int end) {
throw new IndexOutOfBoundsException();
}
- /**
- * Returns a new array containing all elements contained in this
- * {@code ArrayList}.
- *
- * @return an array of the elements from this {@code ArrayList}
- */
+ /// Returns a new array containing all elements contained in this
+ /// `ArrayList`.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`
@Override
public Object[] toArray() {
Object[] result = new Object[size()];
@@ -753,21 +803,26 @@ public Object[] toArray() {
return result;
}
- /**
- * Returns an array containing all elements contained in this
- * {@code ArrayList}. If the specified array is large enough to hold the
- * elements, the specified array is used, otherwise an array of the same
- * type is created. If the specified array is used and is larger than this
- * {@code ArrayList}, the array element following the collection elements
- * is set to null.
- *
- * @param contents
- * the array.
- * @return an array of the elements from this {@code ArrayList}.
- * @throws ArrayStoreException
- * when the type of an element in this {@code ArrayList} cannot
- * be stored in the type of the specified array.
- */
+ /// Returns an array containing all elements contained in this
+ /// `ArrayList`. If the specified array is large enough to hold the
+ /// elements, the specified array is used, otherwise an array of the same
+ /// type is created. If the specified array is used and is larger than this
+ /// `ArrayList`, the array element following the collection elements
+ /// is set to null.
+ ///
+ /// #### Parameters
+ ///
+ /// - `contents`: the array.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayStoreException`: @throws ArrayStoreException
+ /// when the type of an element in this `ArrayList` cannot
+ /// be stored in the type of the specified array.
@Override
@SuppressWarnings("unchecked")
public T[] toArray(T[] contents) {
diff --git a/Ports/CLDC11/src/java/util/AbstractMap.java b/Ports/CLDC11/src/java/util/AbstractMap.java
index 3d57ad8c43..4f0fe8840f 100644
--- a/Ports/CLDC11/src/java/util/AbstractMap.java
+++ b/Ports/CLDC11/src/java/util/AbstractMap.java
@@ -18,13 +18,13 @@
package java.util;
-/**
- * This class is an abstract implementation of the {@code Map} interface. This
- * implementation does not support adding. A subclass must implement the
- * abstract method entrySet().
- *
- * @since 1.2
- */
+/// This class is an abstract implementation of the `Map` interface. This
+/// implementation does not support adding. A subclass must implement the
+/// abstract method entrySet().
+///
+/// #### Since
+///
+/// 1.2
public abstract class AbstractMap implements Map {
// Lazily initialized key set.
@@ -32,16 +32,16 @@ public abstract class AbstractMap implements Map {
Collection valuesCollection;
- /**
- * An immutable key-value mapping.
- *
- * @param
- * the type of key
- * @param
- * the type of value
- *
- * @since 1.6
- */
+ /// An immutable key-value mapping.
+ ///
+ /// @param
+ /// the type of key
+ /// @param
+ /// the type of value
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static class SimpleImmutableEntry implements Map.Entry {
private static final long serialVersionUID = 7138329143949025153L;
@@ -50,70 +50,74 @@ public static class SimpleImmutableEntry implements Map.Entry {
private V value;
- /**
- * Constructs a new instance by key and value.
- *
- * @param theKey
- * the key
- * @param theValue
- * the value
- */
+ /// Constructs a new instance by key and value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `theKey`: the key
+ ///
+ /// - `theValue`: the value
public SimpleImmutableEntry(K theKey, V theValue) {
key = theKey;
value = theValue;
}
- /**
- * Constructs a new instance by an entry
- *
- * @param entry
- * the entry
- */
+ /// Constructs a new instance by an entry
+ ///
+ /// #### Parameters
+ ///
+ /// - `entry`: the entry
public SimpleImmutableEntry(Map.Entry extends K, ? extends V> entry) {
key = entry.getKey();
value = entry.getValue();
}
- /**
- * {@inheritDoc}
- *
- * @see java.util.Map.Entry#getKey()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#getKey()
public K getKey() {
return key;
}
- /**
- * {@inheritDoc}
- *
- * @see java.util.Map.Entry#getValue()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#getValue()
public V getValue() {
return value;
}
- /**
- * Throws an UnsupportedOperationException.
- *
- * @param object
- * new value
- * @return (Does not)
- * @throws UnsupportedOperationException
- * always
- *
- * @see java.util.Map.Entry#setValue(java.lang.Object)
- */
+ /// Throws an UnsupportedOperationException.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: new value
+ ///
+ /// #### Returns
+ ///
+ /// (Does not)
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: always
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#setValue(java.lang.Object)
public V setValue(@SuppressWarnings("unused")
V object) {
throw new UnsupportedOperationException();
}
- /**
- * Answers whether the object is equal to this entry. This works across
- * all kinds of the Map.Entry interface.
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
+ /// Answers whether the object is equal to this entry. This works across
+ /// all kinds of the Map.Entry interface.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#equals(java.lang.Object)
@Override
public boolean equals(Object object) {
if (this == object) {
@@ -129,38 +133,38 @@ public boolean equals(Object object) {
return false;
}
- /**
- * Answers the hash code of this entry.
- *
- * @see java.lang.Object#hashCode()
- */
+ /// Answers the hash code of this entry.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#hashCode()
@Override
public int hashCode() {
return (key == null ? 0 : key.hashCode())
^ (value == null ? 0 : value.hashCode());
}
- /**
- * Answers a String representation of this entry.
- *
- * @see java.lang.Object#toString()
- */
+ /// Answers a String representation of this entry.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#toString()
@Override
public String toString() {
return key + "=" + value; //$NON-NLS-1$
}
}
- /**
- * A key-value mapping.
- *
- * @param
- * the type of key
- * @param
- * the type of value
- *
- * @since 1.6
- */
+ /// A key-value mapping.
+ ///
+ /// @param
+ /// the type of key
+ /// @param
+ /// the type of value
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static class SimpleEntry implements Map.Entry {
private static final long serialVersionUID = -8499721149061103585L;
@@ -169,65 +173,63 @@ public static class SimpleEntry implements Map.Entry {
private V value;
- /**
- * Constructs a new instance by key and value.
- *
- * @param theKey
- * the key
- * @param theValue
- * the value
- */
+ /// Constructs a new instance by key and value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `theKey`: the key
+ ///
+ /// - `theValue`: the value
public SimpleEntry(K theKey, V theValue) {
key = theKey;
value = theValue;
}
- /**
- * Constructs a new instance by an entry
- *
- * @param entry
- * the entry
- */
+ /// Constructs a new instance by an entry
+ ///
+ /// #### Parameters
+ ///
+ /// - `entry`: the entry
public SimpleEntry(Map.Entry extends K, ? extends V> entry) {
key = entry.getKey();
value = entry.getValue();
}
- /**
- * {@inheritDoc}
- *
- * @see java.util.Map.Entry#getKey()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#getKey()
public K getKey() {
return key;
}
- /**
- * {@inheritDoc}
- *
- * @see java.util.Map.Entry#getValue()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#getValue()
public V getValue() {
return value;
}
- /**
- * {@inheritDoc}
- *
- * @see java.util.Map.Entry#setValue(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Map.Entry#setValue(java.lang.Object)
public V setValue(V object) {
V result = value;
value = object;
return result;
}
- /**
- * Answers whether the object is equal to this entry. This works across
- * all kinds of the Map.Entry interface.
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
+ /// Answers whether the object is equal to this entry. This works across
+ /// all kinds of the Map.Entry interface.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#equals(java.lang.Object)
@Override
public boolean equals(Object object) {
if (this == object) {
@@ -243,55 +245,58 @@ public boolean equals(Object object) {
return false;
}
- /**
- * Answers the hash code of this entry.
- *
- * @see java.lang.Object#hashCode()
- */
+ /// Answers the hash code of this entry.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#hashCode()
@Override
public int hashCode() {
return (key == null ? 0 : key.hashCode())
^ (value == null ? 0 : value.hashCode());
}
- /**
- * Answers a String representation of this entry.
- *
- * @see java.lang.Object#toString()
- */
+ /// Answers a String representation of this entry.
+ ///
+ /// #### See also
+ ///
+ /// - java.lang.Object#toString()
@Override
public String toString() {
return key + "=" + value; //$NON-NLS-1$
}
}
- /**
- * Constructs a new instance of this {@code AbstractMap}.
- */
+ /// Constructs a new instance of this `AbstractMap`.
protected AbstractMap() {
super();
}
- /**
- * Removes all elements from this map, leaving it empty.
- *
- * @throws UnsupportedOperationException
- * if removing from this map is not supported.
- * @see #isEmpty()
- * @see #size()
- */
+ /// Removes all elements from this map, leaving it empty.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this map is not supported.
+ ///
+ /// #### See also
+ ///
+ /// - #isEmpty()
+ ///
+ /// - #size()
public void clear() {
entrySet().clear();
}
- /**
- * Returns whether this map contains the specified key.
- *
- * @param key
- * the key to search for.
- * @return {@code true} if this map contains the specified key,
- * {@code false} otherwise.
- */
+ /// Returns whether this map contains the specified key.
+ ///
+ /// #### Parameters
+ ///
+ /// - `key`: the key to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this map contains the specified key,
+ /// `false` otherwise.
public boolean containsKey(Object key) {
Iterator> it = entrySet().iterator();
if (key != null) {
@@ -310,14 +315,16 @@ public boolean containsKey(Object key) {
return false;
}
- /**
- * Returns whether this map contains the specified value.
- *
- * @param value
- * the value to search for.
- * @return {@code true} if this map contains the specified value,
- * {@code false} otherwise.
- */
+ /// Returns whether this map contains the specified value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `value`: the value to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this map contains the specified value,
+ /// `false` otherwise.
public boolean containsValue(Object value) {
Iterator> it = entrySet().iterator();
if (value != null) {
@@ -336,26 +343,32 @@ public boolean containsValue(Object value) {
return false;
}
- /**
- * Returns a set containing all of the mappings in this map. Each mapping is
- * an instance of {@link Map.Entry}. As the set is backed by this map,
- * changes in one will be reflected in the other.
- *
- * @return a set of the mappings.
- */
+ /// Returns a set containing all of the mappings in this map. Each mapping is
+ /// an instance of `Map.Entry`. As the set is backed by this map,
+ /// changes in one will be reflected in the other.
+ ///
+ /// #### Returns
+ ///
+ /// a set of the mappings.
public abstract Set> entrySet();
- /**
- * Compares the specified object to this instance, and returns {@code true}
- * if the specified object is a map and both maps contain the same mappings.
- *
- * @param object
- * the object to compare with this object.
- * @return boolean {@code true} if the object is the same as this object,
- * and {@code false} if it is different from this object.
- * @see #hashCode()
- * @see #entrySet()
- */
+ /// Compares the specified object to this instance, and returns `true`
+ /// if the specified object is a map and both maps contain the same mappings.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to compare with this object.
+ ///
+ /// #### Returns
+ ///
+ /// @return boolean `true` if the object is the same as this object,
+ /// and `false` if it is different from this object.
+ ///
+ /// #### See also
+ ///
+ /// - #hashCode()
+ ///
+ /// - #entrySet()
@Override
public boolean equals(Object object) {
if (this == object) {
@@ -392,14 +405,16 @@ public boolean equals(Object object) {
return false;
}
- /**
- * Returns the value of the mapping with the specified key.
- *
- * @param key
- * the key.
- * @return the value of the mapping with the specified key, or {@code null}
- * if no mapping for the specified key is found.
- */
+ /// Returns the value of the mapping with the specified key.
+ ///
+ /// #### Parameters
+ ///
+ /// - `key`: the key.
+ ///
+ /// #### Returns
+ ///
+ /// @return the value of the mapping with the specified key, or `null`
+ /// if no mapping for the specified key is found.
public V get(Object key) {
Iterator> it = entrySet().iterator();
if (key != null) {
@@ -420,13 +435,16 @@ public V get(Object key) {
return null;
}
- /**
- * Returns the hash code for this object. Objects which are equal must
- * return the same value for this method.
- *
- * @return the hash code of this object.
- * @see #equals(Object)
- */
+ /// Returns the hash code for this object. Objects which are equal must
+ /// return the same value for this method.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code of this object.
+ ///
+ /// #### See also
+ ///
+ /// - #equals(Object)
@Override
public int hashCode() {
int result = 0;
@@ -437,24 +455,27 @@ public int hashCode() {
return result;
}
- /**
- * Returns whether this map is empty.
- *
- * @return {@code true} if this map has no elements, {@code false}
- * otherwise.
- * @see #size()
- */
+ /// Returns whether this map is empty.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this map has no elements, `false`
+ /// otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - #size()
public boolean isEmpty() {
return size() == 0;
}
- /**
- * Returns a set of the keys contained in this map. The set is backed by
- * this map so changes to one are reflected by the other. The returned set
- * does not support adding.
- *
- * @return a set of the keys.
- */
+ /// Returns a set of the keys contained in this map. The set is backed by
+ /// this map so changes to one are reflected by the other. The returned set
+ /// does not support adding.
+ ///
+ /// #### Returns
+ ///
+ /// a set of the keys.
public Set keySet() {
if (keySet == null) {
keySet = new AbstractSet() {
@@ -492,48 +513,57 @@ public void remove() {
return keySet;
}
- /**
- * Maps the specified key to the specified value.
- *
- * @param key
- * the key.
- * @param value
- * the value.
- * @return the value of any previous mapping with the specified key or
- * {@code null} if there was no mapping.
- * @throws UnsupportedOperationException
- * if adding to this map is not supported.
- * @throws ClassCastException
- * if the class of the key or value is inappropriate for this
- * map.
- * @throws IllegalArgumentException
- * if the key or value cannot be added to this map.
- * @throws NullPointerException
- * if the key or value is {@code null} and this Map does not
- * support {@code null} keys or values.
- */
+ /// Maps the specified key to the specified value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `key`: the key.
+ ///
+ /// - `value`: the value.
+ ///
+ /// #### Returns
+ ///
+ /// @return the value of any previous mapping with the specified key or
+ /// `null` if there was no mapping.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this map is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of the key or value is inappropriate for this
+ /// map.
+ ///
+ /// - `IllegalArgumentException`: if the key or value cannot be added to this map.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if the key or value is `null` and this Map does not
+ /// support `null` keys or values.
public V put(@SuppressWarnings("unused")
K key, @SuppressWarnings("unused")
V value) {
throw new UnsupportedOperationException();
}
- /**
- * Copies every mapping in the specified map to this map.
- *
- * @param map
- * the map to copy mappings from.
- * @throws UnsupportedOperationException
- * if adding to this map is not supported.
- * @throws ClassCastException
- * if the class of a key or value is inappropriate for this
- * map.
- * @throws IllegalArgumentException
- * if a key or value cannot be added to this map.
- * @throws NullPointerException
- * if a key or value is {@code null} and this map does not
- * support {@code null} keys or values.
- */
+ /// Copies every mapping in the specified map to this map.
+ ///
+ /// #### Parameters
+ ///
+ /// - `map`: the map to copy mappings from.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this map is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of a key or value is inappropriate for this
+ /// map.
+ ///
+ /// - `IllegalArgumentException`: if a key or value cannot be added to this map.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if a key or value is `null` and this map does not
+ /// support `null` keys or values.
public void putAll(Map extends K, ? extends V> map) {
Iterator it = map.entrySet().iterator();
while (it.hasNext()) {
@@ -542,16 +572,20 @@ public void putAll(Map extends K, ? extends V> map) {
}
}
- /**
- * Removes a mapping with the specified key from this Map.
- *
- * @param key
- * the key of the mapping to remove.
- * @return the value of the removed mapping or {@code null} if no mapping
- * for the specified key was found.
- * @throws UnsupportedOperationException
- * if removing from this map is not supported.
- */
+ /// Removes a mapping with the specified key from this Map.
+ ///
+ /// #### Parameters
+ ///
+ /// - `key`: the key of the mapping to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return the value of the removed mapping or `null` if no mapping
+ /// for the specified key was found.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this map is not supported.
public V remove(Object key) {
Iterator> it = entrySet().iterator();
if (key != null) {
@@ -574,20 +608,20 @@ public V remove(Object key) {
return null;
}
- /**
- * Returns the number of elements in this map.
- *
- * @return the number of elements in this map.
- */
+ /// Returns the number of elements in this map.
+ ///
+ /// #### Returns
+ ///
+ /// the number of elements in this map.
public int size() {
return entrySet().size();
}
- /**
- * Returns the string representation of this map.
- *
- * @return the string representation of this map.
- */
+ /// Returns the string representation of this map.
+ ///
+ /// #### Returns
+ ///
+ /// the string representation of this map.
@Override
public String toString() {
if (isEmpty()) {
@@ -620,25 +654,25 @@ public String toString() {
return buffer.toString();
}
- /**
- * Returns a collection of the values contained in this map. The collection
- * is backed by this map so changes to one are reflected by the other. The
- * collection supports remove, removeAll, retainAll and clear operations,
- * and it does not support add or addAll operations.
- *
- * This method returns a collection which is the subclass of
- * AbstractCollection. The iterator method of this subclass returns a
- * "wrapper object" over the iterator of map's entrySet(). The {@code size}
- * method wraps the map's size method and the {@code contains} method wraps
- * the map's containsValue method.
- *
- * The collection is created when this method is called for the first time
- * and returned in response to all subsequent calls. This method may return
- * different collections when multiple concurrent calls occur to this
- * method, since no synchronization is performed.
- *
- * @return a collection of the values contained in this map.
- */
+ /// Returns a collection of the values contained in this map. The collection
+ /// is backed by this map so changes to one are reflected by the other. The
+ /// collection supports remove, removeAll, retainAll and clear operations,
+ /// and it does not support add or addAll operations.
+ ///
+ /// This method returns a collection which is the subclass of
+ /// AbstractCollection. The iterator method of this subclass returns a
+ /// "wrapper object" over the iterator of map's entrySet(). The `size`
+ /// method wraps the map's size method and the `contains` method wraps
+ /// the map's containsValue method.
+ ///
+ /// The collection is created when this method is called for the first time
+ /// and returned in response to all subsequent calls. This method may return
+ /// different collections when multiple concurrent calls occur to this
+ /// method, since no synchronization is performed.
+ ///
+ /// #### Returns
+ ///
+ /// a collection of the values contained in this map.
public Collection values() {
if (valuesCollection == null) {
valuesCollection = new AbstractCollection() {
diff --git a/Ports/CLDC11/src/java/util/AbstractQueue.java b/Ports/CLDC11/src/java/util/AbstractQueue.java
index 4b4fccf797..3f8362d87c 100644
--- a/Ports/CLDC11/src/java/util/AbstractQueue.java
+++ b/Ports/CLDC11/src/java/util/AbstractQueue.java
@@ -16,35 +16,35 @@
package java.util;
-/**
- * AbstractQueue is an abstract class which implements some of the methods in
- * {@link Queue}. The provided implementations of {@code add, remove} and
- * {@code element} are based on {@code offer, poll}, and {@code peek} except
- * that they throw exceptions to indicate some error instead of returning true
- * or false.
- *
- * @param
- * the type of the element in the collection.
- */
+/// AbstractQueue is an abstract class which implements some of the methods in
+/// `Queue`. The provided implementations of `add, remove` and
+/// `element` are based on `offer, poll`, and `peek` except
+/// that they throw exceptions to indicate some error instead of returning true
+/// or false.
+///
+/// @param
+/// the type of the element in the collection.
public abstract class AbstractQueue extends AbstractCollection implements
Queue {
- /**
- * Constructor to be used by subclasses.
- */
+ /// Constructor to be used by subclasses.
protected AbstractQueue() {
super();
}
- /**
- * Adds an element to the queue.
- *
- * @param o
- * the element to be added to the queue.
- * @return {@code true} if the operation succeeds, otherwise {@code false}.
- * @throws IllegalStateException
- * if the element is not allowed to be added to the queue.
- */
+ /// Adds an element to the queue.
+ ///
+ /// #### Parameters
+ ///
+ /// - `o`: the element to be added to the queue.
+ ///
+ /// #### Returns
+ ///
+ /// `true` if the operation succeeds, otherwise `false`.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalStateException`: if the element is not allowed to be added to the queue.
@Override
public boolean add(E o) {
if (null == o) {
@@ -56,23 +56,28 @@ public boolean add(E o) {
throw new IllegalStateException();
}
- /**
- * Adds all the elements of a collection to the queue. If the collection is
- * the queue itself, then an IllegalArgumentException will be thrown. If
- * during the process, some runtime exception is thrown, then those elements
- * in the collection which have already successfully been added will remain
- * in the queue. The result of the method is undefined if the collection is
- * modified during the process of the method.
- *
- * @param c
- * the collection to be added to the queue.
- * @return {@code true} if the operation succeeds, otherwise {@code false}.
- * @throws NullPointerException
- * if the collection or any element of it is null.
- * @throws IllegalArgumentException
- * If the collection to be added to the queue is the queue
- * itself.
- */
+ /// Adds all the elements of a collection to the queue. If the collection is
+ /// the queue itself, then an IllegalArgumentException will be thrown. If
+ /// during the process, some runtime exception is thrown, then those elements
+ /// in the collection which have already successfully been added will remain
+ /// in the queue. The result of the method is undefined if the collection is
+ /// modified during the process of the method.
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: the collection to be added to the queue.
+ ///
+ /// #### Returns
+ ///
+ /// `true` if the operation succeeds, otherwise `false`.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the collection or any element of it is null.
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException
+ /// If the collection to be added to the queue is the queue
+ /// itself.
@Override
public boolean addAll(Collection extends E> c) {
if (null == c) {
@@ -84,13 +89,15 @@ public boolean addAll(Collection extends E> c) {
return super.addAll(c);
}
- /**
- * Removes the element at the head of the queue and returns it.
- *
- * @return the element at the head of the queue.
- * @throws NoSuchElementException
- * if the queue is empty.
- */
+ /// Removes the element at the head of the queue and returns it.
+ ///
+ /// #### Returns
+ ///
+ /// the element at the head of the queue.
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the queue is empty.
public E remove() {
E o = poll();
if (null == o) {
@@ -99,13 +106,15 @@ public E remove() {
return o;
}
- /**
- * Returns but does not remove the element at the head of the queue.
- *
- * @return the element at the head of the queue.
- * @throws NoSuchElementException
- * if the queue is empty.
- */
+ /// Returns but does not remove the element at the head of the queue.
+ ///
+ /// #### Returns
+ ///
+ /// the element at the head of the queue.
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the queue is empty.
public E element() {
E o = peek();
if (null == o) {
@@ -114,9 +123,7 @@ public E element() {
return o;
}
- /**
- * Removes all elements of the queue, leaving it empty.
- */
+ /// Removes all elements of the queue, leaving it empty.
@Override
public void clear() {
E o;
diff --git a/Ports/CLDC11/src/java/util/AbstractSequentialList.java b/Ports/CLDC11/src/java/util/AbstractSequentialList.java
index e630da2a58..2aab850091 100644
--- a/Ports/CLDC11/src/java/util/AbstractSequentialList.java
+++ b/Ports/CLDC11/src/java/util/AbstractSequentialList.java
@@ -17,18 +17,16 @@
package java.util;
-/**
- * AbstractSequentialList is an abstract implementation of the List interface.
- * This implementation does not support adding. A subclass must implement the
- * abstract method listIterator().
- *
- * @since 1.2
- */
+/// AbstractSequentialList is an abstract implementation of the List interface.
+/// This implementation does not support adding. A subclass must implement the
+/// abstract method listIterator().
+///
+/// #### Since
+///
+/// 1.2
public abstract class AbstractSequentialList extends AbstractList {
- /**
- * Constructs a new instance of this AbstractSequentialList.
- */
+ /// Constructs a new instance of this AbstractSequentialList.
protected AbstractSequentialList() {
super();
}
diff --git a/Ports/CLDC11/src/java/util/AbstractSet.java b/Ports/CLDC11/src/java/util/AbstractSet.java
index 1515550250..6d70be8c0e 100644
--- a/Ports/CLDC11/src/java/util/AbstractSet.java
+++ b/Ports/CLDC11/src/java/util/AbstractSet.java
@@ -17,34 +17,37 @@
package java.util;
-/**
- * An AbstractSet is an abstract implementation of the Set interface. This
- * implementation does not support adding. A subclass must implement the
- * abstract methods iterator() and size().
- *
- * @since 1.2
- */
+/// An AbstractSet is an abstract implementation of the Set interface. This
+/// implementation does not support adding. A subclass must implement the
+/// abstract methods iterator() and size().
+///
+/// #### Since
+///
+/// 1.2
public abstract class AbstractSet extends AbstractCollection implements
Set {
- /**
- * Constructs a new instance of this AbstractSet.
- */
+ /// Constructs a new instance of this AbstractSet.
protected AbstractSet() {
super();
}
- /**
- * Compares the specified object to this Set and returns true if they are
- * equal. The object must be an instance of Set and contain the same
- * objects.
- *
- * @param object
- * the object to compare with this set.
- * @return {@code true} if the specified object is equal to this set,
- * {@code false} otherwise
- * @see #hashCode
- */
+ /// Compares the specified object to this Set and returns true if they are
+ /// equal. The object must be an instance of Set and contain the same
+ /// objects.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to compare with this set.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the specified object is equal to this set,
+ /// `false` otherwise
+ ///
+ /// #### See also
+ ///
+ /// - #hashCode
@Override
public boolean equals(Object object) {
if (this == object) {
@@ -64,14 +67,17 @@ public boolean equals(Object object) {
return false;
}
- /**
- * Returns the hash code for this set. Two set which are equal must return
- * the same value. This implementation calculates the hash code by adding
- * each element's hash code.
- *
- * @return the hash code of this set.
- * @see #equals
- */
+ /// Returns the hash code for this set. Two set which are equal must return
+ /// the same value. This implementation calculates the hash code by adding
+ /// each element's hash code.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code of this set.
+ ///
+ /// #### See also
+ ///
+ /// - #equals
@Override
public int hashCode() {
int result = 0;
@@ -83,17 +89,21 @@ public int hashCode() {
return result;
}
- /**
- * Removes all occurrences in this collection which are contained in the
- * specified collection.
- *
- * @param collection
- * the collection of objects to remove.
- * @return {@code true} if this collection was modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this collection is not supported.
- */
+ /// Removes all occurrences in this collection which are contained in the
+ /// specified collection.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this collection was modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this collection is not supported.
@Override
public boolean removeAll(Collection> collection) {
boolean result = false;
diff --git a/Ports/CLDC11/src/java/util/ArrayDeque.java b/Ports/CLDC11/src/java/util/ArrayDeque.java
index b9a9e1c7e6..d54eb2b787 100644
--- a/Ports/CLDC11/src/java/util/ArrayDeque.java
+++ b/Ports/CLDC11/src/java/util/ArrayDeque.java
@@ -17,19 +17,19 @@
package java.util;
-/**
- * An implementation of Deque, backed by an array.
- *
- * ArrayDeques have no size limit, can not contain null element, and they are
- * not thread-safe.
- *
- * All optional operations are supported, and the elements can be any objects.
- *
- * @param
- * the type of elements in this collection
- *
- * @since 1.6
- */
+/// An implementation of Deque, backed by an array.
+///
+/// ArrayDeques have no size limit, can not contain null element, and they are
+/// not thread-safe.
+///
+/// All optional operations are supported, and the elements can be any objects.
+///
+/// @param
+/// the type of elements in this collection
+///
+/// #### Since
+///
+/// 1.6
public class ArrayDeque extends AbstractCollection implements Deque {
private static final int DEFAULT_SIZE = 16;
@@ -172,20 +172,17 @@ public void remove() {
}
}
- /**
- * Constructs a new empty instance of ArrayDeque big enough for 16 elements.
- */
+ /// Constructs a new empty instance of ArrayDeque big enough for 16 elements.
public ArrayDeque() {
this(DEFAULT_SIZE);
}
- /**
- * Constructs a new empty instance of ArrayDeque big enough for specified
- * number of elements.
- *
- * @param minSize
- * the smallest size of the ArrayDeque
- */
+ /// Constructs a new empty instance of ArrayDeque big enough for specified
+ /// number of elements.
+ ///
+ /// #### Parameters
+ ///
+ /// - `minSize`: the smallest size of the ArrayDeque
@SuppressWarnings("unchecked")
public ArrayDeque(final int minSize) {
int size = countInitSize(minSize);
@@ -202,16 +199,17 @@ private int countInitSize(final int minSize) {
return -1;
}
- /**
- * Constructs a new instance of ArrayDeque containing the elements of the
- * specified collection, with the order returned by the collection's
- * iterator.
- *
- * @param c
- * the source of the elements
- * @throws NullPointerException
- * if the collection is null
- */
+ /// Constructs a new instance of ArrayDeque containing the elements of the
+ /// specified collection, with the order returned by the collection's
+ /// iterator.
+ ///
+ /// #### Parameters
+ ///
+ /// - `c`: the source of the elements
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the collection is null
@SuppressWarnings("unchecked")
public ArrayDeque(Collection extends E> c) {
elements = (E[]) new Object[countInitSize(c.size())];
@@ -224,42 +222,57 @@ public ArrayDeque(Collection extends E> c) {
}
}
- /**
- * {@inheritDoc}
- *
- * @param e
- * the element
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Deque#addFirst(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#addFirst(java.lang.Object)
public void addFirst(E e) {
offerFirst(e);
}
- /**
- * {@inheritDoc}
- *
- * @param e
- * the element
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Deque#addLast(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#addLast(java.lang.Object)
public void addLast(E e) {
addLastImpl(e);
}
- /**
- * {@inheritDoc}
- *
- * @param e
- * the element
- * @return true
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Deque#offerFirst(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Returns
+ ///
+ /// true
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#offerFirst(java.lang.Object)
public boolean offerFirst(E e) {
checkNull(e);
checkAndExpand();
@@ -270,208 +283,284 @@ public boolean offerFirst(E e) {
return true;
}
- /**
- * {@inheritDoc}
- *
- * @param e
- * the element
- * @return true if the operation succeeds or false if it fails
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Deque#offerLast(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Returns
+ ///
+ /// true if the operation succeeds or false if it fails
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#offerLast(java.lang.Object)
public boolean offerLast(E e) {
return addLastImpl(e);
}
- /**
- * Inserts the element at the tail of the deque.
- *
- * @param e
- * the element
- * @return true if the operation succeeds or false if it fails.
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Queue#offer(java.lang.Object)
- */
+ /// Inserts the element at the tail of the deque.
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Returns
+ ///
+ /// true if the operation succeeds or false if it fails.
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Queue#offer(java.lang.Object)
public boolean offer(E e) {
return addLastImpl(e);
}
- /**
- * Inserts the element to the tail of the deque.
- *
- * @param e
- * the element
- * @return true
- * @see java.util.AbstractCollection#add(java.lang.Object)
- */
+ /// Inserts the element to the tail of the deque.
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element
+ ///
+ /// #### Returns
+ ///
+ /// true
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#add(java.lang.Object)
@Override
public boolean add(E e) {
return addLastImpl(e);
}
- /**
- * {@inheritDoc}
- *
- * @param e
- * the element to push
- * @throws NullPointerException
- * if the element is null
- * @see java.util.Deque#push(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `e`: the element to push
+ ///
+ /// #### Throws
+ ///
+ /// - `NullPointerException`: if the element is null
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#push(java.lang.Object)
public void push(E e) {
offerFirst(e);
}
- /**
- * {@inheritDoc}
- *
- * @return the head element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Deque#removeFirst()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the head element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#removeFirst()
public E removeFirst() {
checkEmpty();
return removePollFirstImpl();
}
- /**
- * Gets and removes the head element of this deque. This method throws an
- * exception if the deque is empty.
- *
- * @return the head element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Queue#remove()
- */
+ /// Gets and removes the head element of this deque. This method throws an
+ /// exception if the deque is empty.
+ ///
+ /// #### Returns
+ ///
+ /// the head element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Queue#remove()
public E remove() {
return removeFirst();
}
- /**
- * {@inheritDoc}
- *
- * @return the head element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Deque#pop()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the head element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#pop()
public E pop() {
return removeFirst();
}
- /**
- * {@inheritDoc}
- *
- * @return the tail element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Deque#removeLast()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the tail element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#removeLast()
public E removeLast() {
checkEmpty();
return removeLastImpl();
}
- /**
- * {@inheritDoc}
- *
- * @return the head element or null if the deque is empty
- * @see java.util.Deque#pollFirst()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the head element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#pollFirst()
public E pollFirst() {
return (status == DequeStatus.Empty) ? null : removePollFirstImpl();
}
- /**
- * Gets and removes the head element of this deque. This method returns null
- * if the deque is empty.
- *
- * @return the head element or null if the deque is empty
- * @see java.util.Queue#poll()
- */
+ /// Gets and removes the head element of this deque. This method returns null
+ /// if the deque is empty.
+ ///
+ /// #### Returns
+ ///
+ /// the head element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Queue#poll()
public E poll() {
return pollFirst();
}
- /**
- * {@inheritDoc}
- *
- * @return the tail element or null if the deque is empty
- * @see java.util.Deque#pollLast()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the tail element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#pollLast()
public E pollLast() {
return (status == DequeStatus.Empty) ? null : removeLastImpl();
}
- /**
- * {@inheritDoc}
- *
- * @return the head element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Deque#getFirst()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the head element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#getFirst()
public E getFirst() {
checkEmpty();
return elements[front];
}
- /**
- * Gets but does not remove the head element of this deque. It throws an
- * exception if the deque is empty.
- *
- * @return the head element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Queue#element()
- */
+ /// Gets but does not remove the head element of this deque. It throws an
+ /// exception if the deque is empty.
+ ///
+ /// #### Returns
+ ///
+ /// the head element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Queue#element()
public E element() {
return getFirst();
}
- /**
- * {@inheritDoc}
- *
- * @return the tail element
- * @throws NoSuchElementException
- * if the deque is empty
- * @see java.util.Deque#getLast()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the tail element
+ ///
+ /// #### Throws
+ ///
+ /// - `NoSuchElementException`: if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#getLast()
public E getLast() {
checkEmpty();
return elements[circularSmallerPos(rear)];
}
- /**
- * {@inheritDoc}
- *
- * @return the head element or null if the deque is empty
- * @see java.util.Deque#peekFirst()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the head element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#peekFirst()
public E peekFirst() {
return (status == DequeStatus.Empty) ? null : elements[front];
}
- /**
- * Gets but not removes the head element of this deque. This method returns
- * null if the deque is empty.
- *
- * @return the head element or null if the deque is empty
- * @see java.util.Queue#peek()
- */
+ /// Gets but not removes the head element of this deque. This method returns
+ /// null if the deque is empty.
+ ///
+ /// #### Returns
+ ///
+ /// the head element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Queue#peek()
public E peek() {
return (status == DequeStatus.Empty) ? null : elements[front];
}
- /**
- * {@inheritDoc}
- *
- * @return the tail element or null if the deque is empty
- * @see java.util.Deque#peekLast()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the tail element or null if the deque is empty
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#peekLast()
public E peekLast() {
return (status == DequeStatus.Empty) ? null
: elements[circularSmallerPos(rear)];
@@ -524,12 +613,11 @@ private void checkAndExpand() {
elements = newElements;
}
- /**
- * Resets the status after adding or removing operation.
- *
- * @param adding
- * if the method is called after an "adding" operation
- */
+ /// Resets the status after adding or removing operation.
+ ///
+ /// #### Parameters
+ ///
+ /// - `adding`: if the method is called after an "adding" operation
private void resetStatus(boolean adding) {
if (front == rear) {
status = adding ? DequeStatus.Full : DequeStatus.Empty;
@@ -567,43 +655,58 @@ private E removeLastImpl() {
return element;
}
- /**
- * {@inheritDoc}
- *
- * @param obj
- * the element to be removed
- * @return true if the operation succeeds or false if the deque does not
- * contain the element
- * @see java.util.Deque#removeFirstOccurrence(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `obj`: the element to be removed
+ ///
+ /// #### Returns
+ ///
+ /// @return true if the operation succeeds or false if the deque does not
+ /// contain the element
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#removeFirstOccurrence(java.lang.Object)
public boolean removeFirstOccurrence(Object obj) {
return removeFirstOccurrenceImpl(obj);
}
- /**
- * Removes the first equivalent element of the specified object. If the
- * deque does not contain the element, it is unchanged and returns false.
- *
- * @param obj
- * the element to be removed
- * @return true if the operation succeeds or false if the deque does not
- * contain the element
- * @see java.util.AbstractCollection#remove(java.lang.Object)
- */
+ /// Removes the first equivalent element of the specified object. If the
+ /// deque does not contain the element, it is unchanged and returns false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `obj`: the element to be removed
+ ///
+ /// #### Returns
+ ///
+ /// @return true if the operation succeeds or false if the deque does not
+ /// contain the element
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#remove(java.lang.Object)
@Override
public boolean remove(Object obj) {
return removeFirstOccurrenceImpl(obj);
}
- /**
- * {@inheritDoc}
- *
- * @param obj
- * the element to be removed
- * @return true if the operation succeeds or false if the deque does not
- * contain the element.
- * @see java.util.Deque#removeLastOccurrence(java.lang.Object)
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Parameters
+ ///
+ /// - `obj`: the element to be removed
+ ///
+ /// #### Returns
+ ///
+ /// @return true if the operation succeeds or false if the deque does not
+ /// contain the element.
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#removeLastOccurrence(java.lang.Object)
public boolean removeLastOccurrence(final Object obj) {
if (null != obj) {
Iterator iter = descendingIterator();
@@ -656,12 +759,15 @@ private void removeInternal(final int current, final boolean frontShift) {
resetStatus(false);
}
- /**
- * Returns the size of the deque.
- *
- * @return the size of the deque
- * @see java.util.AbstractCollection#size()
- */
+ /// Returns the size of the deque.
+ ///
+ /// #### Returns
+ ///
+ /// the size of the deque
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#size()
@Override
public int size() {
if (status == DequeStatus.Full) {
@@ -671,25 +777,33 @@ public int size() {
: (rear + elements.length - front);
}
- /**
- * Returns true if the deque has no elements.
- *
- * @return true if the deque has no elements, false otherwise
- * @see java.util.AbstractCollection#isEmpty()
- */
+ /// Returns true if the deque has no elements.
+ ///
+ /// #### Returns
+ ///
+ /// true if the deque has no elements, false otherwise
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#isEmpty()
@Override
public boolean isEmpty() {
return 0 == size();
}
- /**
- * Returns true if the specified element is in the deque.
- *
- * @param obj
- * the element
- * @return true if the element is in the deque, false otherwise
- * @see java.util.AbstractCollection#contains(java.lang.Object)
- */
+ /// Returns true if the specified element is in the deque.
+ ///
+ /// #### Parameters
+ ///
+ /// - `obj`: the element
+ ///
+ /// #### Returns
+ ///
+ /// true if the element is in the deque, false otherwise
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#contains(java.lang.Object)
@SuppressWarnings("cast")
@Override
public boolean contains(final Object obj) {
@@ -704,11 +818,11 @@ public boolean contains(final Object obj) {
return false;
}
- /**
- * Empty the deque.
- *
- * @see java.util.AbstractCollection#clear()
- */
+ /// Empty the deque.
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#clear()
@SuppressWarnings("cast")
@Override
public void clear() {
@@ -724,25 +838,31 @@ public void clear() {
modCount = 0;
}
- /**
- * Returns the iterator of the deque. The elements will be ordered from head
- * to tail.
- *
- * @return the iterator
- * @see java.util.AbstractCollection#iterator()
- */
+ /// Returns the iterator of the deque. The elements will be ordered from head
+ /// to tail.
+ ///
+ /// #### Returns
+ ///
+ /// the iterator
+ ///
+ /// #### See also
+ ///
+ /// - java.util.AbstractCollection#iterator()
@SuppressWarnings("synthetic-access")
@Override
public Iterator iterator() {
return new ArrayDequeIterator();
}
- /**
- * {@inheritDoc}
- *
- * @return the reverse order Iterator
- * @see java.util.Deque#descendingIterator()
- */
+ /// {@inheritDoc}
+ ///
+ /// #### Returns
+ ///
+ /// the reverse order Iterator
+ ///
+ /// #### See also
+ ///
+ /// - java.util.Deque#descendingIterator()
public Iterator descendingIterator() {
return new ReverseArrayDequeIterator();
}
diff --git a/Ports/CLDC11/src/java/util/ArrayList.java b/Ports/CLDC11/src/java/util/ArrayList.java
index dd92ede3c3..e6885dbe47 100644
--- a/Ports/CLDC11/src/java/util/ArrayList.java
+++ b/Ports/CLDC11/src/java/util/ArrayList.java
@@ -18,13 +18,13 @@
package java.util;
-/**
- * ArrayList is an implementation of {@link List}, backed by an array. All
- * optional operations adding, removing, and replacing are supported. The
- * elements can be any objects.
- *
- * @since 1.2
- */
+/// ArrayList is an implementation of `List`, backed by an array. All
+/// optional operations adding, removing, and replacing are supported. The
+/// elements can be any objects.
+///
+/// #### Since
+///
+/// 1.2
public class ArrayList extends AbstractList implements List, RandomAccess {
private static final long serialVersionUID = 8683452581122892189L;
@@ -35,20 +35,17 @@ public class ArrayList extends AbstractList implements List, RandomAcce
private transient E[] array;
- /**
- * Constructs a new instance of {@code ArrayList} with ten capacity.
- */
+ /// Constructs a new instance of `ArrayList` with ten capacity.
public ArrayList() {
this(10);
}
- /**
- * Constructs a new instance of {@code ArrayList} with the specified
- * capacity.
- *
- * @param capacity
- * the initial capacity of this {@code ArrayList}.
- */
+ /// Constructs a new instance of `ArrayList` with the specified
+ /// capacity.
+ ///
+ /// #### Parameters
+ ///
+ /// - `capacity`: the initial capacity of this `ArrayList`.
public ArrayList(int capacity) {
if (capacity < 0) {
throw new IllegalArgumentException();
@@ -57,14 +54,13 @@ public ArrayList(int capacity) {
array = newElementArray(capacity);
}
- /**
- * Constructs a new instance of {@code ArrayList} containing the elements of
- * the specified collection. The initial size of the {@code ArrayList} will
- * be 10% larger than the size of the specified collection.
- *
- * @param collection
- * the collection of elements to add.
- */
+ /// Constructs a new instance of `ArrayList` containing the elements of
+ /// the specified collection. The initial size of the `ArrayList` will
+ /// be 10% larger than the size of the specified collection.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of elements to add.
public ArrayList(Collection extends E> collection) {
firstIndex = 0;
Object[] objects = toObjectArray(collection);
@@ -96,19 +92,20 @@ private E[] newElementArray(int size) {
return (E[]) new Object[size];
}
- /**
- * Inserts the specified object into this {@code ArrayList} at the specified
- * location. The object is inserted before any previous element at the
- * specified location. If the location is equal to the size of this
- * {@code ArrayList}, the object is added at the end.
- *
- * @param location
- * the index at which to insert the object.
- * @param object
- * the object to add.
- * @throws IndexOutOfBoundsException
- * when {@code location < 0 || > size()}
- */
+ /// Inserts the specified object into this `ArrayList` at the specified
+ /// location. The object is inserted before any previous element at the
+ /// specified location. If the location is equal to the size of this
+ /// `ArrayList`, the object is added at the end.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to insert the object.
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: when `location size()`
@Override
public void add(int location, E object) {
if (location < 0 || location > size) {
@@ -143,13 +140,15 @@ public void add(int location, E object) {
modCount++;
}
- /**
- * Adds the specified object at the end of this {@code ArrayList}.
- *
- * @param object
- * the object to add.
- * @return always true
- */
+ /// Adds the specified object at the end of this `ArrayList`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Returns
+ ///
+ /// always true
@Override
public boolean add(E object) {
if (firstIndex + size == array.length) {
@@ -161,20 +160,24 @@ public boolean add(E object) {
return true;
}
- /**
- * Inserts the objects in the specified collection at the specified location
- * in this List. The objects are added in the order they are returned from
- * the collection's iterator.
- *
- * @param location
- * the index at which to insert.
- * @param collection
- * the collection of objects.
- * @return {@code true} if this {@code ArrayList} is modified, {@code false}
- * otherwise.
- * @throws IndexOutOfBoundsException
- * when {@code location < 0 || > size()}
- */
+ /// Inserts the objects in the specified collection at the specified location
+ /// in this List. The objects are added in the order they are returned from
+ /// the collection's iterator.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to insert.
+ ///
+ /// - `collection`: the collection of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `ArrayList` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: when `location size()`
@Override
public boolean addAll(int location, Collection extends E> collection) {
if (location < 0 || location > size) {
@@ -224,14 +227,16 @@ public boolean addAll(int location, Collection extends E> collection) {
return true;
}
- /**
- * Adds the objects in the specified collection to this {@code ArrayList}.
- *
- * @param collection
- * the collection of objects.
- * @return {@code true} if this {@code ArrayList} is modified, {@code false}
- * otherwise.
- */
+ /// Adds the objects in the specified collection to this `ArrayList`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `ArrayList` is modified, `false`
+ /// otherwise.
@Override
public boolean addAll(Collection extends E> collection) {
Object[] dumpArray = toObjectArray(collection);
@@ -248,12 +253,13 @@ public boolean addAll(Collection extends E> collection) {
return true;
}
- /**
- * Removes all elements from this {@code ArrayList}, leaving it empty.
- *
- * @see #isEmpty
- * @see #size
- */
+ /// Removes all elements from this `ArrayList`, leaving it empty.
+ ///
+ /// #### See also
+ ///
+ /// - #isEmpty
+ ///
+ /// - #size
@Override
public void clear() {
if (size != 0) {
@@ -268,14 +274,16 @@ public void clear() {
}
}
- /**
- * Searches this {@code ArrayList} for the specified object.
- *
- * @param object
- * the object to search for.
- * @return {@code true} if {@code object} is an element of this
- * {@code ArrayList}, {@code false} otherwise
- */
+ /// Searches this `ArrayList` for the specified object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if `object` is an element of this
+ /// `ArrayList`, `false` otherwise
@Override
public boolean contains(Object object) {
int lastIndex = firstIndex + size;
@@ -295,13 +303,12 @@ public boolean contains(Object object) {
return false;
}
- /**
- * Ensures that after this operation the {@code ArrayList} can hold the
- * specified number of elements without further growing.
- *
- * @param minimumCapacity
- * the minimum capacity asked for.
- */
+ /// Ensures that after this operation the `ArrayList` can hold the
+ /// specified number of elements without further growing.
+ ///
+ /// #### Parameters
+ ///
+ /// - `minimumCapacity`: the minimum capacity asked for.
public void ensureCapacity(int minimumCapacity) {
int required = minimumCapacity - array.length;
if (required > 0) {
@@ -452,15 +459,19 @@ public int lastIndexOf(Object object) {
return -1;
}
- /**
- * Removes the object at the specified location from this list.
- *
- * @param location
- * the index of the object to remove.
- * @return the removed object.
- * @throws IndexOutOfBoundsException
- * when {@code location < 0 || >= size()}
- */
+ /// Removes the object at the specified location from this list.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index of the object to remove.
+ ///
+ /// #### Returns
+ ///
+ /// the removed object.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: when `location = size()`
@Override
public E remove(int location) {
E result;
@@ -509,17 +520,18 @@ public boolean remove(Object object) {
return false;
}
- /**
- * Removes the objects in the specified range from the start to the end, but
- * not including the end index.
- *
- * @param start
- * the index at which to start removing.
- * @param end
- * the index one after the end of the range to remove.
- * @throws IndexOutOfBoundsException
- * when {@code start < 0, start > end} or {@code end > size()}
- */
+ /// Removes the objects in the specified range from the start to the end, but
+ /// not including the end index.
+ ///
+ /// #### Parameters
+ ///
+ /// - `start`: the index at which to start removing.
+ ///
+ /// - `end`: the index one after the end of the range to remove.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: when `start end` or `end > size()`
@Override
protected void removeRange(int start, int end) {
// REVIEW: does RI call this from remove(location)
@@ -551,18 +563,22 @@ protected void removeRange(int start, int end) {
modCount++;
}
- /**
- * Replaces the element at the specified location in this {@code ArrayList}
- * with the specified object.
- *
- * @param location
- * the index at which to put the specified object.
- * @param object
- * the object to add.
- * @return the previous element at the index.
- * @throws IndexOutOfBoundsException
- * when {@code location < 0 || >= size()}
- */
+ /// Replaces the element at the specified location in this `ArrayList`
+ /// with the specified object.
+ ///
+ /// #### Parameters
+ ///
+ /// - `location`: the index at which to put the specified object.
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Returns
+ ///
+ /// the previous element at the index.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: when `location = size()`
@Override
public E set(int location, E object) {
if (location < 0 || location >= size) {
@@ -573,22 +589,22 @@ public E set(int location, E object) {
return result;
}
- /**
- * Returns the number of elements in this {@code ArrayList}.
- *
- * @return the number of elements in this {@code ArrayList}.
- */
+ /// Returns the number of elements in this `ArrayList`.
+ ///
+ /// #### Returns
+ ///
+ /// the number of elements in this `ArrayList`.
@Override
public int size() {
return size;
}
- /**
- * Returns a new array containing all elements contained in this
- * {@code ArrayList}.
- *
- * @return an array of the elements from this {@code ArrayList}
- */
+ /// Returns a new array containing all elements contained in this
+ /// `ArrayList`.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`
@Override
public Object[] toArray() {
Object[] result = new Object[size];
@@ -596,21 +612,26 @@ public Object[] toArray() {
return result;
}
- /**
- * Returns an array containing all elements contained in this
- * {@code ArrayList}. If the specified array is large enough to hold the
- * elements, the specified array is used, otherwise an array of the same
- * type is created. If the specified array is used and is larger than this
- * {@code ArrayList}, the array element following the collection elements
- * is set to null.
- *
- * @param contents
- * the array.
- * @return an array of the elements from this {@code ArrayList}.
- * @throws ArrayStoreException
- * when the type of an element in this {@code ArrayList} cannot
- * be stored in the type of the specified array.
- */
+ /// Returns an array containing all elements contained in this
+ /// `ArrayList`. If the specified array is large enough to hold the
+ /// elements, the specified array is used, otherwise an array of the same
+ /// type is created. If the specified array is used and is larger than this
+ /// `ArrayList`, the array element following the collection elements
+ /// is set to null.
+ ///
+ /// #### Parameters
+ ///
+ /// - `contents`: the array.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `ArrayList`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayStoreException`: @throws ArrayStoreException
+ /// when the type of an element in this `ArrayList` cannot
+ /// be stored in the type of the specified array.
@Override
@SuppressWarnings("unchecked")
public T[] toArray(T[] contents) {
@@ -627,12 +648,12 @@ public T[] toArray(T[] contents) {
return (T[])arr;
}
- /**
- * Sets the capacity of this {@code ArrayList} to be the same as the current
- * size.
- *
- * @see #size
- */
+ /// Sets the capacity of this `ArrayList` to be the same as the current
+ /// size.
+ ///
+ /// #### See also
+ ///
+ /// - #size
public void trimToSize() {
E[] newArray = newElementArray(size);
System.arraycopy(array, firstIndex, newArray, 0, size);
diff --git a/Ports/CLDC11/src/java/util/Arrays.java b/Ports/CLDC11/src/java/util/Arrays.java
index c0cb5ce72d..6d6df670dc 100644
--- a/Ports/CLDC11/src/java/util/Arrays.java
+++ b/Ports/CLDC11/src/java/util/Arrays.java
@@ -20,11 +20,11 @@
import java.io.Serializable;
import java.lang.reflect.Array;
-/**
- * {@code Arrays} contains static methods which operate on arrays.
- *
- * @since 1.2
- */
+/// `Arrays` contains static methods which operate on arrays.
+///
+/// #### Since
+///
+/// 1.2
public class Arrays {
/* Specifies when to switch to insertion sort */
@@ -129,194 +129,227 @@ private Arrays() {
/* empty */
}
- /**
- * Returns a {@code List} of the objects in the specified array. The size of the
- * {@code List} cannot be modified, i.e. adding and removing are unsupported, but
- * the elements can be set. Setting an element modifies the underlying
- * array.
- *
- * @param array
- * the array.
- * @return a {@code List} of the elements of the specified array.
- */
+ /// Returns a `List` of the objects in the specified array. The size of the
+ /// `List` cannot be modified, i.e. adding and removing are unsupported, but
+ /// the elements can be set. Setting an element modifies the underlying
+ /// array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array.
+ ///
+ /// #### Returns
+ ///
+ /// a `List` of the elements of the specified array.
public static List asList(T... array) {
return new ArrayList(array);
}
- /**
- * Performs a binary search for the specified element in the specified
- * ascending sorted array. Searching in an unsorted array has an undefined
- * result. It's also undefined which element is found if there are multiple
- * occurrences of the same element.
- *
- * @param array
- * the sorted {@code byte} array to search.
- * @param value
- * the {@code byte} element to find.
- * @return the non-negative index of the element, or a negative index which
- * is {@code -index - 1} where the element would be inserted.
- */
+ /// Performs a binary search for the specified element in the specified
+ /// ascending sorted array. Searching in an unsorted array has an undefined
+ /// result. It's also undefined which element is found if there are multiple
+ /// occurrences of the same element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted `byte` array to search.
+ ///
+ /// - `value`: the `byte` element to find.
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is `-index - 1` where the element would be inserted.
public static int binarySearch(byte[] array, byte value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted char array to search
- * @param value
- * the char element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted char array to search
+ ///
+ /// - `value`: the char element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(char[] array, char value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted double array to search
- * @param value
- * the double element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted double array to search
+ ///
+ /// - `value`: the double element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(double[] array, double value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted float array to search
- * @param value
- * the float element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted float array to search
+ ///
+ /// - `value`: the float element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(float[] array, float value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted int array to search
- * @param value
- * the int element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted int array to search
+ ///
+ /// - `value`: the int element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(int[] array, int value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted long array to search
- * @param value
- * the long element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted long array to search
+ ///
+ /// - `value`: the long element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(long[] array, long value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted Object array to search
- * @param object
- * the Object element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- *
- * @exception ClassCastException
- * when an element in the array or the search element does
- * not implement Comparable, or cannot be compared to each
- * other
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted Object array to search
+ ///
+ /// - `object`: the Object element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @exception ClassCastException
+ /// when an element in the array or the search element does
+ /// not implement Comparable, or cannot be compared to each
+ /// other
@SuppressWarnings("unchecked")
public static int binarySearch(Object[] array, Object object) {
return binarySearch(array, 0, array.length, object);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array using the Comparator to compare elements.
- *
- * @param
- * type of object
- *
- * @param array
- * the sorted Object array to search
- * @param object
- * the char element to find
- * @param comparator
- * the Comparator
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- *
- * @exception ClassCastException
- * when an element in the array and the search element cannot
- * be compared to each other using the Comparator
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array using the Comparator to compare elements.
+ ///
+ /// @param
+ /// type of object
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted Object array to search
+ ///
+ /// - `object`: the char element to find
+ ///
+ /// - `comparator`: the Comparator
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @exception ClassCastException
+ /// when an element in the array and the search element cannot
+ /// be compared to each other using the Comparator
public static int binarySearch(T[] array, T object,
Comparator super T> comparator) {
return binarySearch(array, 0, array.length, object, comparator);
}
- /**
- * Performs a binary search for the specified element in the specified
- * sorted array.
- *
- * @param array
- * the sorted short array to search
- * @param value
- * the short element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- */
+ /// Performs a binary search for the specified element in the specified
+ /// sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted short array to search
+ ///
+ /// - `value`: the short element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
public static int binarySearch(short[] array, short value) {
return binarySearch(array, 0, array.length, value);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted byte array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the byte element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted byte array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the byte element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(byte[] array, int startIndex, int endIndex,
byte value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -343,27 +376,36 @@ public static int binarySearch(byte[] array, int startIndex, int endIndex,
return -mid - (value < array[mid] ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted char array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the char element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted char array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the char element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(char[] array, int startIndex, int endIndex,
char value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -390,27 +432,36 @@ public static int binarySearch(char[] array, int startIndex, int endIndex,
return -mid - (value < array[mid] ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted double array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the double element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted double array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the double element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(double[] array, int startIndex,
int endIndex, double value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -438,27 +489,36 @@ public static int binarySearch(double[] array, int startIndex,
return -mid - (lessThan(value, array[mid]) ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted float array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the float element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted float array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the float element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(float[] array, int startIndex, int endIndex,
float value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -486,27 +546,36 @@ public static int binarySearch(float[] array, int startIndex, int endIndex,
return -mid - (lessThan(value, array[mid]) ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted int array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the int element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted int array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the int element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(int[] array, int startIndex, int endIndex,
int value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -533,27 +602,36 @@ public static int binarySearch(int[] array, int startIndex, int endIndex,
return -mid - (value < array[mid] ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted long array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the long element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted long array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the long element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(long[] array, int startIndex, int endIndex,
long value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -580,30 +658,40 @@ public static int binarySearch(long[] array, int startIndex, int endIndex,
return -mid - (value < array[mid] ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted Object array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param object
- * the object element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws ClassCastException
- * when an element in the array or the search element does not
- * implement Comparable, or cannot be compared to each other
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted Object array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `object`: the object element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// when an element in the array or the search element does not
+ /// implement Comparable, or cannot be compared to each other
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
@SuppressWarnings("unchecked")
public static int binarySearch(Object[] array, int startIndex,
int endIndex, Object object) {
@@ -635,34 +723,45 @@ public static int binarySearch(Object[] array, int startIndex,
return -mid - (result >= 0 ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array using the Comparator to compare elements.
- *
- * @param
- * type of object
- * @param array
- * the sorted Object array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param object
- * the value element to find
- * @param comparator
- * the Comparator
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws ClassCastException
- * when an element in the array and the search element cannot be
- * compared to each other using the Comparator
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array using the Comparator to compare elements.
+ ///
+ /// @param
+ /// type of object
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted Object array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `object`: the value element to find
+ ///
+ /// - `comparator`: the Comparator
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// when an element in the array and the search element cannot be
+ /// compared to each other using the Comparator
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(T[] array, int startIndex, int endIndex,
T object, Comparator super T> comparator) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -693,27 +792,36 @@ public static int binarySearch(T[] array, int startIndex, int endIndex,
return -mid - (result >= 0 ? 1 : 2);
}
- /**
- * Performs a binary search for the specified element in a part of the
- * specified sorted array.
- *
- * @param array
- * the sorted short array to search
- * @param startIndex
- * the inclusive start index
- * @param endIndex
- * the exclusive end index
- * @param value
- * the short element to find
- * @return the non-negative index of the element, or a negative index which
- * is the -index - 1 where the element would be inserted
- * @throws IllegalArgumentException -
- * if startIndex is bigger than endIndex
- * @throws ArrayIndexOutOfBoundsException -
- * if startIndex is smaller than zero or or endIndex is bigger
- * than length of array
- * @since 1.6
- */
+ /// Performs a binary search for the specified element in a part of the
+ /// specified sorted array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the sorted short array to search
+ ///
+ /// - `startIndex`: the inclusive start index
+ ///
+ /// - `endIndex`: the exclusive end index
+ ///
+ /// - `value`: the short element to find
+ ///
+ /// #### Returns
+ ///
+ /// @return the non-negative index of the element, or a negative index which
+ /// is the -index - 1 where the element would be inserted
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: @throws IllegalArgumentException -
+ /// if startIndex is bigger than endIndex
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: @throws ArrayIndexOutOfBoundsException -
+ /// if startIndex is smaller than zero or or endIndex is bigger
+ /// than length of array
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int binarySearch(short[] array, int startIndex, int endIndex,
short value) {
checkIndexForBinarySearch(array.length, startIndex, endIndex);
@@ -740,16 +848,15 @@ public static int binarySearch(short[] array, int startIndex, int endIndex,
return -mid - (value < array[mid] ? 1 : 2);
}
- /**
- * Fills the array with the given value.
- *
- * @param length
- * length of the array
- * @param start
- * start index
- * @param end
- * end index
- */
+ /// Fills the array with the given value.
+ ///
+ /// #### Parameters
+ ///
+ /// - `length`: length of the array
+ ///
+ /// - `start`: start index
+ ///
+ /// - `end`: end index
private static void checkIndexForBinarySearch(int length, int start, int end) {
if (start > end) {
throw new IllegalArgumentException();
@@ -759,35 +866,36 @@ private static void checkIndexForBinarySearch(int length, int start, int end) {
}
}
- /**
- * Fills the specified array with the specified element.
- * @param array
- * the {@code byte} array to fill.
- * @param value
- * the {@code byte} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `byte` array to fill.
+ ///
+ /// - `value`: the `byte` element.
public static void fill(byte[] array, byte value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code byte} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code byte} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `byte` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `byte` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(byte[] array, int start, int end, byte value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -795,36 +903,36 @@ public static void fill(byte[] array, int start, int end, byte value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code short} array to fill.
- * @param value
- * the {@code short} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `short` array to fill.
+ ///
+ /// - `value`: the `short` element.
public static void fill(short[] array, short value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code short} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code short} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `short` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `short` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(short[] array, int start, int end, short value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -832,36 +940,36 @@ public static void fill(short[] array, int start, int end, short value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code char} array to fill.
- * @param value
- * the {@code char} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `char` array to fill.
+ ///
+ /// - `value`: the `char` element.
public static void fill(char[] array, char value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code char} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code char} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `char` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `char` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(char[] array, int start, int end, char value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -869,36 +977,36 @@ public static void fill(char[] array, int start, int end, char value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code int} array to fill.
- * @param value
- * the {@code int} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `int` array to fill.
+ ///
+ /// - `value`: the `int` element.
public static void fill(int[] array, int value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code int} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code int} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `int` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `int` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(int[] array, int start, int end, int value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -906,36 +1014,36 @@ public static void fill(int[] array, int start, int end, int value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code long} array to fill.
- * @param value
- * the {@code long} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `long` array to fill.
+ ///
+ /// - `value`: the `long` element.
public static void fill(long[] array, long value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code long} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code long} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `long` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `long` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(long[] array, int start, int end, long value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -943,36 +1051,36 @@ public static void fill(long[] array, int start, int end, long value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code float} array to fill.
- * @param value
- * the {@code float} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `float` array to fill.
+ ///
+ /// - `value`: the `float` element.
public static void fill(float[] array, float value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code float} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code float} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `float` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `float` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(float[] array, int start, int end, float value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -980,36 +1088,36 @@ public static void fill(float[] array, int start, int end, float value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code double} array to fill.
- * @param value
- * the {@code double} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `double` array to fill.
+ ///
+ /// - `value`: the `double` element.
public static void fill(double[] array, double value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code double} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code double} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `double` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `double` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(double[] array, int start, int end, double value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -1017,36 +1125,36 @@ public static void fill(double[] array, int start, int end, double value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code boolean} array to fill.
- * @param value
- * the {@code boolean} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `boolean` array to fill.
+ ///
+ /// - `value`: the `boolean` element.
public static void fill(boolean[] array, boolean value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code boolean} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code boolean} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `boolean` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `boolean` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(boolean[] array, int start, int end, boolean value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -1054,36 +1162,36 @@ public static void fill(boolean[] array, int start, int end, boolean value) {
}
}
- /**
- * Fills the specified array with the specified element.
- *
- * @param array
- * the {@code Object} array to fill.
- * @param value
- * the {@code Object} element.
- */
+ /// Fills the specified array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to fill.
+ ///
+ /// - `value`: the `Object` element.
public static void fill(Object[] array, Object value) {
for (int i = 0; i < array.length; i++) {
array[i] = value;
}
}
- /**
- * Fills the specified range in the array with the specified element.
- *
- * @param array
- * the {@code Object} array to fill.
- * @param start
- * the first index to fill.
- * @param end
- * the last + 1 index to fill.
- * @param value
- * the {@code Object} element.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Fills the specified range in the array with the specified element.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to fill.
+ ///
+ /// - `start`: the first index to fill.
+ ///
+ /// - `end`: the last + 1 index to fill.
+ ///
+ /// - `value`: the `Object` element.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void fill(Object[] array, int start, int end, Object value) {
checkBounds(array.length, start, end);
for (int i = start; i < end; i++) {
@@ -1091,22 +1199,24 @@ public static void fill(Object[] array, int start, int end, Object value) {
}
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code boolean} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Boolean}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `boolean` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Boolean`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(boolean[] array) {
if (array == null) {
return 0;
@@ -1119,22 +1229,24 @@ public static int hashCode(boolean[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * not-null {@code int} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Integer}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// not-null `int` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Integer`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(int[] array) {
if (array == null) {
return 0;
@@ -1147,22 +1259,24 @@ public static int hashCode(int[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code short} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Short}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `short` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Short`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(short[] array) {
if (array == null) {
return 0;
@@ -1175,22 +1289,24 @@ public static int hashCode(short[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code char} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Character}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `char` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Character`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(char[] array) {
if (array == null) {
return 0;
@@ -1203,22 +1319,24 @@ public static int hashCode(char[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code byte} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Byte}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `byte` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Byte`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(byte[] array) {
if (array == null) {
return 0;
@@ -1231,22 +1349,24 @@ public static int hashCode(byte[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code long} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Long}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `long` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Long`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(long[] array) {
if (array == null) {
return 0;
@@ -1263,22 +1383,24 @@ public static int hashCode(long[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code float} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Float}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `float` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Float`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(float[] array) {
if (array == null) {
return 0;
@@ -1294,22 +1416,24 @@ public static int hashCode(float[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. For any two
- * {@code double} arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the
- * {@link List#hashCode()}} method which is invoked on a {@link List}}
- * containing a sequence of {@link Double}} instances representing the
- * elements of array in the same order. If the array is {@code null}, the return
- * value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. For any two
+ /// `double` arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the
+ /// `List#hashCode()`} method which is invoked on a `List`}
+ /// containing a sequence of `Double`} instances representing the
+ /// elements of array in the same order. If the array is `null`, the return
+ /// value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(double[] array) {
if (array == null) {
return 0;
@@ -1327,26 +1451,28 @@ public static int hashCode(double[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the contents of the given array. If the
- * array contains other arrays as its elements, the hash code is based on
- * their identities not their contents. So it is acceptable to invoke this
- * method on an array that contains itself as an element, either directly or
- * indirectly.
- *
- * For any two arrays {@code a} and {@code b}, if
- * {@code Arrays.equals(a, b)} returns {@code true}, it means
- * that the return value of {@code Arrays.hashCode(a)} equals
- * {@code Arrays.hashCode(b)}.
- *
- * The value returned by this method is the same value as the method
- * Arrays.asList(array).hashCode(). If the array is {@code null}, the return value
- * is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the contents of the given array. If the
+ /// array contains other arrays as its elements, the hash code is based on
+ /// their identities not their contents. So it is acceptable to invoke this
+ /// method on an array that contains itself as an element, either directly or
+ /// indirectly.
+ ///
+ /// For any two arrays `a` and `b`, if
+ /// `Arrays.equals(a, b)` returns `true`, it means
+ /// that the return value of `Arrays.hashCode(a)` equals
+ /// `Arrays.hashCode(b)`.
+ ///
+ /// The value returned by this method is the same value as the method
+ /// Arrays.asList(array).hashCode(). If the array is `null`, the return value
+ /// is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int hashCode(Object[] array) {
if (array == null) {
return 0;
@@ -1365,33 +1491,35 @@ public static int hashCode(Object[] array) {
return hashCode;
}
- /**
- * Returns a hash code based on the "deep contents" of the given array. If
- * the array contains other arrays as its elements, the hash code is based
- * on their contents not their identities. So it is not acceptable to invoke
- * this method on an array that contains itself as an element, either
- * directly or indirectly.
- *
- * For any two arrays {@code a} and {@code b}, if
- * {@code Arrays.deepEquals(a, b)} returns {@code true}, it
- * means that the return value of {@code Arrays.deepHashCode(a)} equals
- * {@code Arrays.deepHashCode(b)}.
- *
- * The computation of the value returned by this method is similar to that
- * of the value returned by {@link List#hashCode()}} invoked on a
- * {@link List}} containing a sequence of instances representing the
- * elements of array in the same order. The difference is: If an element e
- * of array is itself an array, its hash code is computed by calling the
- * appropriate overloading of {@code Arrays.hashCode(e)} if e is an array of a
- * primitive type, or by calling {@code Arrays.deepHashCode(e)} recursively if e is
- * an array of a reference type. The value returned by this method is the
- * same value as the method {@code Arrays.asList(array).hashCode()}. If the array is
- * {@code null}, the return value is 0.
- *
- * @param array
- * the array whose hash code to compute.
- * @return the hash code for {@code array}.
- */
+ /// Returns a hash code based on the "deep contents" of the given array. If
+ /// the array contains other arrays as its elements, the hash code is based
+ /// on their contents not their identities. So it is not acceptable to invoke
+ /// this method on an array that contains itself as an element, either
+ /// directly or indirectly.
+ ///
+ /// For any two arrays `a` and `b`, if
+ /// `Arrays.deepEquals(a, b)` returns `true`, it
+ /// means that the return value of `Arrays.deepHashCode(a)` equals
+ /// `Arrays.deepHashCode(b)`.
+ ///
+ /// The computation of the value returned by this method is similar to that
+ /// of the value returned by `List#hashCode()`} invoked on a
+ /// `List`} containing a sequence of instances representing the
+ /// elements of array in the same order. The difference is: If an element e
+ /// of array is itself an array, its hash code is computed by calling the
+ /// appropriate overloading of `Arrays.hashCode(e)` if e is an array of a
+ /// primitive type, or by calling `Arrays.deepHashCode(e)` recursively if e is
+ /// an array of a reference type. The value returned by this method is the
+ /// same value as the method `Arrays.asList(array).hashCode()`. If the array is
+ /// `null`, the return value is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array whose hash code to compute.
+ ///
+ /// #### Returns
+ ///
+ /// the hash code for `array`.
public static int deepHashCode(Object[] array) {
if (array == null) {
return 0;
@@ -1413,17 +1541,19 @@ private static int deepHashCodeElement(Object element) {
return element.hashCode();
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code byte} array.
- * @param array2
- * the second {@code byte} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `byte` array.
+ ///
+ /// - `array2`: the second `byte` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(byte[] array1, byte[] array2) {
if (array1 == array2) {
return true;
@@ -1439,17 +1569,19 @@ public static boolean equals(byte[] array1, byte[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code short} array.
- * @param array2
- * the second {@code short} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `short` array.
+ ///
+ /// - `array2`: the second `short` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(short[] array1, short[] array2) {
if (array1 == array2) {
return true;
@@ -1465,17 +1597,19 @@ public static boolean equals(short[] array1, short[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code char} array.
- * @param array2
- * the second {@code char} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `char` array.
+ ///
+ /// - `array2`: the second `char` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(char[] array1, char[] array2) {
if (array1 == array2) {
return true;
@@ -1491,17 +1625,19 @@ public static boolean equals(char[] array1, char[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code int} array.
- * @param array2
- * the second {@code int} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `int` array.
+ ///
+ /// - `array2`: the second `int` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(int[] array1, int[] array2) {
if (array1 == array2) {
return true;
@@ -1517,17 +1653,19 @@ public static boolean equals(int[] array1, int[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code long} array.
- * @param array2
- * the second {@code long} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `long` array.
+ ///
+ /// - `array2`: the second `long` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(long[] array1, long[] array2) {
if (array1 == array2) {
return true;
@@ -1543,19 +1681,24 @@ public static boolean equals(long[] array1, long[] array2) {
return true;
}
- /**
- * Compares the two arrays. The values are compared in the same manner as
- * {@code Float.equals()}.
- *
- * @param array1
- * the first {@code float} array.
- * @param array2
- * the second {@code float} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- * @see Float#equals(Object)
- */
+ /// Compares the two arrays. The values are compared in the same manner as
+ /// `Float.equals()`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `float` array.
+ ///
+ /// - `array2`: the second `float` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - Float#equals(Object)
public static boolean equals(float[] array1, float[] array2) {
if (array1 == array2) {
return true;
@@ -1572,19 +1715,24 @@ public static boolean equals(float[] array1, float[] array2) {
return true;
}
- /**
- * Compares the two arrays. The values are compared in the same manner as
- * {@code Double.equals()}.
- *
- * @param array1
- * the first {@code double} array.
- * @param array2
- * the second {@code double} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- * @see Double#equals(Object)
- */
+ /// Compares the two arrays. The values are compared in the same manner as
+ /// `Double.equals()`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `double` array.
+ ///
+ /// - `array2`: the second `double` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - Double#equals(Object)
public static boolean equals(double[] array1, double[] array2) {
if (array1 == array2) {
return true;
@@ -1601,17 +1749,19 @@ public static boolean equals(double[] array1, double[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code boolean} array.
- * @param array2
- * the second {@code boolean} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `boolean` array.
+ ///
+ /// - `array2`: the second `boolean` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal, `false` otherwise.
public static boolean equals(boolean[] array1, boolean[] array2) {
if (array1 == array2) {
return true;
@@ -1627,17 +1777,19 @@ public static boolean equals(boolean[] array1, boolean[] array2) {
return true;
}
- /**
- * Compares the two arrays.
- *
- * @param array1
- * the first {@code Object} array.
- * @param array2
- * the second {@code Object} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal according to {@code equals()}, {@code false} otherwise.
- */
+ /// Compares the two arrays.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `Object` array.
+ ///
+ /// - `array2`: the second `Object` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal according to `equals()`, `false` otherwise.
public static boolean equals(Object[] array1, Object[] array2) {
if (array1 == array2) {
return true;
@@ -1654,42 +1806,44 @@ public static boolean equals(Object[] array1, Object[] array2) {
return true;
}
- /**
- * Returns {@code true} if the two given arrays are deeply equal to one another.
- * Unlike the method {@code equals(Object[] array1, Object[] array2)}, this method
- * is appropriate for use for nested arrays of arbitrary depth.
- *
- * Two array references are considered deeply equal if they are both {@code null},
- * or if they refer to arrays that have the same length and the elements at
- * each index in the two arrays are equal.
- *
- * Two {@code null} elements {@code element1} and {@code element2} are possibly deeply equal if any
- * of the following conditions satisfied:
- *
- * {@code element1} and {@code element2} are both arrays of object reference types, and
- * {@code Arrays.deepEquals(element1, element2)} would return {@code true}.
- *
- * {@code element1} and {@code element2} are arrays of the same primitive type, and the
- * appropriate overloading of {@code Arrays.equals(element1, element2)} would return
- * {@code true}.
- *
- * {@code element1 == element2}
- *
- * {@code element1.equals(element2)} would return {@code true}.
- *
- * Note that this definition permits {@code null} elements at any depth.
- *
- * If either of the given arrays contain themselves as elements, the
- * behavior of this method is uncertain.
- *
- * @param array1
- * the first {@code Object} array.
- * @param array2
- * the second {@code Object} array.
- * @return {@code true} if both arrays are {@code null} or if the arrays have the
- * same length and the elements at each index in the two arrays are
- * equal according to {@code equals()}, {@code false} otherwise.
- */
+ /// Returns `true` if the two given arrays are deeply equal to one another.
+ /// Unlike the method `equals(Object[] array1, Object[] array2)`, this method
+ /// is appropriate for use for nested arrays of arbitrary depth.
+ ///
+ /// Two array references are considered deeply equal if they are both `null`,
+ /// or if they refer to arrays that have the same length and the elements at
+ /// each index in the two arrays are equal.
+ ///
+ /// Two `null` elements `element1` and `element2` are possibly deeply equal if any
+ /// of the following conditions satisfied:
+ ///
+ /// `element1` and `element2` are both arrays of object reference types, and
+ /// `Arrays.deepEquals(element1, element2)` would return `true`.
+ ///
+ /// `element1` and `element2` are arrays of the same primitive type, and the
+ /// appropriate overloading of `Arrays.equals(element1, element2)` would return
+ /// `true`.
+ ///
+ /// `element1 == element2`
+ ///
+ /// `element1.equals(element2)` would return `true`.
+ ///
+ /// Note that this definition permits `null` elements at any depth.
+ ///
+ /// If either of the given arrays contain themselves as elements, the
+ /// behavior of this method is uncertain.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array1`: the first `Object` array.
+ ///
+ /// - `array2`: the second `Object` array.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if both arrays are `null` or if the arrays have the
+ /// same length and the elements at each index in the two arrays are
+ /// equal according to `equals()`, `false` otherwise.
public static boolean deepEquals(Object[] array1, Object[] array2) {
if (array1 == array2) {
return true;
@@ -1858,30 +2012,30 @@ private static int med3(short[] array, int a, int b, int c) {
: a));
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code byte} array to be sorted.
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `byte` array to be sorted.
public static void sort(byte[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order.
- *
- * @param array
- * the {@code byte} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `byte` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(byte[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -1983,30 +2137,30 @@ private static void sort(int start, int end, byte[] array) {
}
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code char} array to be sorted.
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `char` array to be sorted.
public static void sort(char[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order.
- *
- * @param array
- * the {@code char} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `char` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(char[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2093,33 +2247,39 @@ private static void sort(int start, int end, char[] array) {
}
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code double} array to be sorted.
- * @see #sort(double[], int, int)
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `double` array to be sorted.
+ ///
+ /// #### See also
+ ///
+ /// - #sort(double[], int, int)
public static void sort(double[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order. The
- * values are sorted according to the order imposed by {@code Double.compareTo()}.
- *
- * @param array
- * the {@code double} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- * @see Double#compareTo(Double)
- */
+ /// Sorts the specified range in the array in ascending numerical order. The
+ /// values are sorted according to the order imposed by `Double.compareTo()`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `double` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
+ ///
+ /// #### See also
+ ///
+ /// - Double#compareTo(Double)
public static void sort(double[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2206,33 +2366,39 @@ private static void sort(int start, int end, double[] array) {
}
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code float} array to be sorted.
- * @see #sort(float[], int, int)
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `float` array to be sorted.
+ ///
+ /// #### See also
+ ///
+ /// - #sort(float[], int, int)
public static void sort(float[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order. The
- * values are sorted according to the order imposed by {@code Float.compareTo()}.
- *
- * @param array
- * the {@code float} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- * @see Float#compareTo(Float)
- */
+ /// Sorts the specified range in the array in ascending numerical order. The
+ /// values are sorted according to the order imposed by `Float.compareTo()`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `float` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
+ ///
+ /// #### See also
+ ///
+ /// - Float#compareTo(Float)
public static void sort(float[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2319,30 +2485,30 @@ private static void sort(int start, int end, float[] array) {
}
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code int} array to be sorted.
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `int` array to be sorted.
public static void sort(int[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order.
- *
- * @param array
- * the {@code int} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `int` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(int[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2429,30 +2595,30 @@ private static void sort(int start, int end, int[] array) {
}
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code long} array to be sorted.
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `long` array to be sorted.
public static void sort(long[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order.
- *
- * @param array
- * the {@code long} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `long` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(long[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2539,40 +2705,47 @@ private static void sort(int start, int end, long[] array) {
}
}
- /**
- * Sorts the specified array in ascending natural order.
- *
- * @param array
- * the {@code Object} array to be sorted.
- * @throws ClassCastException
- * if an element in the array does not implement {@code Comparable}
- * or if some elements cannot be compared to each other.
- * @see #sort(Object[], int, int)
- */
+ /// Sorts the specified array in ascending natural order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to be sorted.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if an element in the array does not implement `Comparable`
+ /// or if some elements cannot be compared to each other.
+ ///
+ /// #### See also
+ ///
+ /// - #sort(Object[], int, int)
public static void sort(Object[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending natural order. All
- * elements must implement the {@code Comparable} interface and must be
- * comparable to each other without a {@code ClassCastException} being
- * thrown.
- *
- * @param array
- * the {@code Object} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws ClassCastException
- * if an element in the array does not implement {@code Comparable}
- * or some elements cannot be compared to each other.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending natural order. All
+ /// elements must implement the `Comparable` interface and must be
+ /// comparable to each other without a `ClassCastException` being
+ /// thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if an element in the array does not implement `Comparable`
+ /// or some elements cannot be compared to each other.
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(Object[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -2595,38 +2768,41 @@ private static void sort(int start, int end, Object[] array) {
}
}
- /**
- * Swaps the elements at the given indices in the array.
- *
- * @param a -
- * the index of one element to be swapped.
- * @param b -
- * the index of the other element to be swapped.
- * @param arr -
- * the array in which to swap elements.
- */
+ /// Swaps the elements at the given indices in the array.
+ ///
+ /// #### Parameters
+ ///
+ /// - `a`: @param a -
+ /// the index of one element to be swapped.
+ ///
+ /// - `b`: @param b -
+ /// the index of the other element to be swapped.
+ ///
+ /// - `arr`: @param arr -
+ /// the array in which to swap elements.
private static void swap(int a, int b, Object[] arr) {
Object tmp = arr[a];
arr[a] = arr[b];
arr[b] = tmp;
}
- /**
- * Performs a sort on the section of the array between the given indices
- * using a mergesort with exponential search algorithm (in which the merge
- * is performed by exponential search). n*log(n) performance is guaranteed
- * and in the average case it will be faster then any mergesort in which the
- * merge is performed by linear search.
- *
- * @param in -
- * the array for sorting.
- * @param out -
- * the result, sorted array.
- * @param start
- * the start index
- * @param end
- * the end index + 1
- */
+ /// Performs a sort on the section of the array between the given indices
+ /// using a mergesort with exponential search algorithm (in which the merge
+ /// is performed by exponential search). n*log(n) performance is guaranteed
+ /// and in the average case it will be faster then any mergesort in which the
+ /// merge is performed by linear search.
+ ///
+ /// #### Parameters
+ ///
+ /// - `in`: @param in -
+ /// the array for sorting.
+ ///
+ /// - `out`: @param out -
+ /// the result, sorted array.
+ ///
+ /// - `start`: the start index
+ ///
+ /// - `end`: the end index + 1
@SuppressWarnings("unchecked")
private static void mergeSort(Object[] in, Object[] out, int start,
int end) {
@@ -2692,24 +2868,26 @@ private static void mergeSort(Object[] in, Object[] out, int start,
}
}
- /**
- * Performs a sort on the section of the array between the given indices
- * using a mergesort with exponential search algorithm (in which the merge
- * is performed by exponential search). n*log(n) performance is guaranteed
- * and in the average case it will be faster then any mergesort in which the
- * merge is performed by linear search.
- *
- * @param in -
- * the array for sorting.
- * @param out -
- * the result, sorted array.
- * @param start
- * the start index
- * @param end
- * the end index + 1
- * @param c -
- * the comparator to determine the order of the array.
- */
+ /// Performs a sort on the section of the array between the given indices
+ /// using a mergesort with exponential search algorithm (in which the merge
+ /// is performed by exponential search). n*log(n) performance is guaranteed
+ /// and in the average case it will be faster then any mergesort in which the
+ /// merge is performed by linear search.
+ ///
+ /// #### Parameters
+ ///
+ /// - `in`: @param in -
+ /// the array for sorting.
+ ///
+ /// - `out`: @param out -
+ /// the result, sorted array.
+ ///
+ /// - `start`: the start index
+ ///
+ /// - `end`: the end index + 1
+ ///
+ /// - `c`: @param c -
+ /// the comparator to determine the order of the array.
@SuppressWarnings("unchecked")
private static void mergeSort(Object[] in, Object[] out, int start,
int end, Comparator c) {
@@ -2774,29 +2952,28 @@ private static void mergeSort(Object[] in, Object[] out, int start,
}
}
- /**
- * Finds the place in the given range of specified sorted array, where the
- * element should be inserted for getting sorted array. Uses exponential
- * search algorithm.
- *
- * @param arr -
- * the array with already sorted range
- *
- * @param val -
- * object to be inserted
- *
- * @param l -
- * the start index
- *
- * @param r -
- * the end index
- *
- * @param bnd -
- * possible values 0,-1. "-1" - val is located at index more then
- * elements equals to val. "0" - val is located at index less
- * then elements equals to val.
- *
- */
+ /// Finds the place in the given range of specified sorted array, where the
+ /// element should be inserted for getting sorted array. Uses exponential
+ /// search algorithm.
+ ///
+ /// #### Parameters
+ ///
+ /// - `arr`: @param arr -
+ /// the array with already sorted range
+ ///
+ /// - `val`: @param val -
+ /// object to be inserted
+ ///
+ /// - `l`: @param l -
+ /// the start index
+ ///
+ /// - `r`: @param r -
+ /// the end index
+ ///
+ /// - `bnd`: @param bnd -
+ /// possible values 0,-1. "-1" - val is located at index more then
+ /// elements equals to val. "0" - val is located at index less
+ /// then elements equals to val.
@SuppressWarnings("unchecked")
private static int find(Object[] arr, java.lang.Comparable val, int bnd, int l, int r) {
int m = l;
@@ -2822,26 +2999,31 @@ private static int find(Object[] arr, java.lang.Comparable val, int bnd, int l,
return l - 1;
}
- /**
- * Finds the place of specified range of specified sorted array, where the
- * element should be inserted for getting sorted array. Uses exponential
- * search algorithm.
- *
- * @param arr -
- * the array with already sorted range
- * @param val -
- * object to be inserted
- * @param l -
- * the start index
- * @param r -
- * the end index
- * @param bnd -
- * possible values 0,-1. "-1" - val is located at index more then
- * elements equals to val. "0" - val is located at index less
- * then elements equals to val.
- * @param c -
- * the comparator used to compare Objects
- */
+ /// Finds the place of specified range of specified sorted array, where the
+ /// element should be inserted for getting sorted array. Uses exponential
+ /// search algorithm.
+ ///
+ /// #### Parameters
+ ///
+ /// - `arr`: @param arr -
+ /// the array with already sorted range
+ ///
+ /// - `val`: @param val -
+ /// object to be inserted
+ ///
+ /// - `l`: @param l -
+ /// the start index
+ ///
+ /// - `r`: @param r -
+ /// the end index
+ ///
+ /// - `bnd`: @param bnd -
+ /// possible values 0,-1. "-1" - val is located at index more then
+ /// elements equals to val. "0" - val is located at index less
+ /// then elements equals to val.
+ ///
+ /// - `c`: @param c -
+ /// the comparator used to compare Objects
@SuppressWarnings("unchecked")
private static int find(Object[] arr, Object val, int bnd, int l, int r,
Comparator c) {
@@ -2891,21 +3073,25 @@ private static int charAt(String str, int i) {
return str.charAt(i);
}
- /**
- * Copies object from one array to another array with reverse of objects
- * order. Source and destination arrays may be the same.
- *
- * @param src -
- * the source array.
- * @param from -
- * starting position in the source array.
- * @param dst -
- * the destination array.
- * @param to -
- * starting position in the destination array.
- * @param len -
- * the number of array elements to be copied.
- */
+ /// Copies object from one array to another array with reverse of objects
+ /// order. Source and destination arrays may be the same.
+ ///
+ /// #### Parameters
+ ///
+ /// - `src`: @param src -
+ /// the source array.
+ ///
+ /// - `from`: @param from -
+ /// starting position in the source array.
+ ///
+ /// - `dst`: @param dst -
+ /// the destination array.
+ ///
+ /// - `to`: @param to -
+ /// starting position in the destination array.
+ ///
+ /// - `len`: @param len -
+ /// the number of array elements to be copied.
private static void copySwap(Object[] src, int from, Object[] dst, int to,
int len) {
if (src == dst && from + len > to) {
@@ -2925,39 +3111,46 @@ private static void copySwap(Object[] src, int from, Object[] dst, int to,
}
}
- /**
- * Performs a sort on the given String array. Elements will be re-ordered into
- * ascending order.
- *
- * @param arr -
- * the array to sort
- * @param start -
- * the start index
- * @param end -
- * the end index + 1
- */
+ /// Performs a sort on the given String array. Elements will be re-ordered into
+ /// ascending order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `arr`: @param arr -
+ /// the array to sort
+ ///
+ /// - `start`: @param start -
+ /// the start index
+ ///
+ /// - `end`: @param end -
+ /// the end index + 1
private static void stableStringSort(String[] arr, int start,
int end) {
stableStringSort(arr, arr, new String[end], start, end, 0);
}
- /**
- * Performs a sort on the given String array. Elements will be re-ordered into
- * ascending order. Uses a stable ternary quick sort algorithm.
- *
- * @param arr -
- * the array to sort
- * @param src -
- * auxiliary array
- * @param dst -
- * auxiliary array
- * @param start -
- * the start index
- * @param end -
- * the end index + 1
- * @param chId -
- * index of char for current sorting
- */
+ /// Performs a sort on the given String array. Elements will be re-ordered into
+ /// ascending order. Uses a stable ternary quick sort algorithm.
+ ///
+ /// #### Parameters
+ ///
+ /// - `arr`: @param arr -
+ /// the array to sort
+ ///
+ /// - `src`: @param src -
+ /// auxiliary array
+ ///
+ /// - `dst`: @param dst -
+ /// auxiliary array
+ ///
+ /// - `start`: @param start -
+ /// the start index
+ ///
+ /// - `end`: @param end -
+ /// the end index + 1
+ ///
+ /// - `chId`: @param chId -
+ /// index of char for current sorting
private static void stableStringSort(String[] arr, String[] src,
String[] dst, int start, int end, int chId) {
int length = end - start;
@@ -3056,27 +3249,29 @@ private static void stableStringSort(String[] arr, String[] src,
}
}
- /**
- * Sorts the specified range in the array using the specified {@code Comparator}.
- * All elements must be comparable to each other without a
- * {@code ClassCastException} being thrown.
- *
- * @param array
- * the {@code Object} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @param comparator
- * the {@code Comparator}.
- * @throws ClassCastException
- * if elements in the array cannot be compared to each other
- * using the {@code Comparator}.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array using the specified `Comparator`.
+ /// All elements must be comparable to each other without a
+ /// `ClassCastException` being thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// - `comparator`: the `Comparator`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if elements in the array cannot be compared to each other
+ /// using the `Comparator`.
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(T[] array, int start, int end,
Comparator super T> comparator) {
if (array == null) {
@@ -3098,46 +3293,48 @@ private static void sort(int start, int end, T[] array,
}
}
- /**
- * Sorts the specified array using the specified {@code Comparator}. All elements
- * must be comparable to each other without a {@code ClassCastException} being thrown.
- *
- * @param array
- * the {@code Object} array to be sorted.
- * @param comparator
- * the {@code Comparator}.
- * @throws ClassCastException
- * if elements in the array cannot be compared to each other
- * using the {@code Comparator}.
- */
+ /// Sorts the specified array using the specified `Comparator`. All elements
+ /// must be comparable to each other without a `ClassCastException` being thrown.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to be sorted.
+ ///
+ /// - `comparator`: the `Comparator`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if elements in the array cannot be compared to each other
+ /// using the `Comparator`.
public static void sort(T[] array, Comparator super T> comparator) {
sort(0, array.length, array, comparator);
}
- /**
- * Sorts the specified array in ascending numerical order.
- *
- * @param array
- * the {@code short} array to be sorted.
- */
+ /// Sorts the specified array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `short` array to be sorted.
public static void sort(short[] array) {
sort(0, array.length, array);
}
- /**
- * Sorts the specified range in the array in ascending numerical order.
- *
- * @param array
- * the {@code short} array to be sorted.
- * @param start
- * the start index to sort.
- * @param end
- * the last + 1 index to sort.
- * @throws IllegalArgumentException
- * if {@code start > end}.
- * @throws ArrayIndexOutOfBoundsException
- * if {@code start < 0} or {@code end > array.length}.
- */
+ /// Sorts the specified range in the array in ascending numerical order.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `short` array to be sorted.
+ ///
+ /// - `start`: the start index to sort.
+ ///
+ /// - `end`: the last + 1 index to sort.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `start > end`.
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if `start array.length`.
public static void sort(short[] array, int start, int end) {
if (array == null) {
throw new NullPointerException();
@@ -3224,18 +3421,23 @@ private static void sort(int start, int end, short[] array) {
}
}
- /**
- * Creates a {@code String} representation of the {@code boolean[]} passed.
- * The result is surrounded by brackets ({@code "[]"}), each
- * element is converted to a {@code String} via the
- * {@link String#valueOf(boolean)} and separated by {@code ", "}.
- * If the array is {@code null}, then {@code "null"} is returned.
- *
- * @param array
- * the {@code boolean} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `boolean[]` passed.
+ /// The result is surrounded by brackets (`"[]"`), each
+ /// element is converted to a `String` via the
+ /// `String#valueOf(boolean)` and separated by `", "`.
+ /// If the array is `null`, then `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `boolean` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(boolean[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3254,18 +3456,23 @@ public static String toString(boolean[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code byte[]} passed. The
- * result is surrounded by brackets ({@code "[]"}), each element
- * is converted to a {@code String} via the {@link String#valueOf(int)} and
- * separated by {@code ", "}. If the array is {@code null}, then
- * {@code "null"} is returned.
- *
- * @param array
- * the {@code byte} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `byte[]` passed. The
+ /// result is surrounded by brackets (`"[]"`), each element
+ /// is converted to a `String` via the `String#valueOf(int)` and
+ /// separated by `", "`. If the array is `null`, then
+ /// `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `byte` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(byte[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3284,18 +3491,23 @@ public static String toString(byte[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code char[]} passed. The
- * result is surrounded by brackets ({@code "[]"}), each element
- * is converted to a {@code String} via the {@link String#valueOf(char)} and
- * separated by {@code ", "}. If the array is {@code null}, then
- * {@code "null"} is returned.
- *
- * @param array
- * the {@code char} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `char[]` passed. The
+ /// result is surrounded by brackets (`"[]"`), each element
+ /// is converted to a `String` via the `String#valueOf(char)` and
+ /// separated by `", "`. If the array is `null`, then
+ /// `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `char` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(char[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3314,18 +3526,23 @@ public static String toString(char[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code double[]} passed.
- * The result is surrounded by brackets ({@code "[]"}), each
- * element is converted to a {@code String} via the
- * {@link String#valueOf(double)} and separated by {@code ", "}.
- * If the array is {@code null}, then {@code "null"} is returned.
- *
- * @param array
- * the {@code double} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `double[]` passed.
+ /// The result is surrounded by brackets (`"[]"`), each
+ /// element is converted to a `String` via the
+ /// `String#valueOf(double)` and separated by `", "`.
+ /// If the array is `null`, then `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `double` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(double[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3344,18 +3561,23 @@ public static String toString(double[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code float[]} passed.
- * The result is surrounded by brackets ({@code "[]"}), each
- * element is converted to a {@code String} via the
- * {@link String#valueOf(float)} and separated by {@code ", "}.
- * If the array is {@code null}, then {@code "null"} is returned.
- *
- * @param array
- * the {@code float} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `float[]` passed.
+ /// The result is surrounded by brackets (`"[]"`), each
+ /// element is converted to a `String` via the
+ /// `String#valueOf(float)` and separated by `", "`.
+ /// If the array is `null`, then `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `float` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(float[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3374,18 +3596,23 @@ public static String toString(float[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code int[]} passed. The
- * result is surrounded by brackets ({@code "[]"}), each element
- * is converted to a {@code String} via the {@link String#valueOf(int)} and
- * separated by {@code ", "}. If the array is {@code null}, then
- * {@code "null"} is returned.
- *
- * @param array
- * the {@code int} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `int[]` passed. The
+ /// result is surrounded by brackets (`"[]"`), each element
+ /// is converted to a `String` via the `String#valueOf(int)` and
+ /// separated by `", "`. If the array is `null`, then
+ /// `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `int` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(int[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3404,18 +3631,23 @@ public static String toString(int[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code long[]} passed. The
- * result is surrounded by brackets ({@code "[]"}), each element
- * is converted to a {@code String} via the {@link String#valueOf(long)} and
- * separated by {@code ", "}. If the array is {@code null}, then
- * {@code "null"} is returned.
- *
- * @param array
- * the {@code long} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `long[]` passed. The
+ /// result is surrounded by brackets (`"[]"`), each element
+ /// is converted to a `String` via the `String#valueOf(long)` and
+ /// separated by `", "`. If the array is `null`, then
+ /// `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `long` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(long[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3434,18 +3666,23 @@ public static String toString(long[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code short[]} passed.
- * The result is surrounded by brackets ({@code "[]"}), each
- * element is converted to a {@code String} via the
- * {@link String#valueOf(int)} and separated by {@code ", "}. If
- * the array is {@code null}, then {@code "null"} is returned.
- *
- * @param array
- * the {@code short} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `short[]` passed.
+ /// The result is surrounded by brackets (`"[]"`), each
+ /// element is converted to a `String` via the
+ /// `String#valueOf(int)` and separated by `", "`. If
+ /// the array is `null`, then `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `short` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(short[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3464,18 +3701,23 @@ public static String toString(short[] array) {
return sb.toString();
}
- /**
- * Creates a {@code String} representation of the {@code Object[]} passed.
- * The result is surrounded by brackets ({@code "[]"}), each
- * element is converted to a {@code String} via the
- * {@link String#valueOf(Object)} and separated by {@code ", "}.
- * If the array is {@code null}, then {@code "null"} is returned.
- *
- * @param array
- * the {@code Object} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a `String` representation of the `Object[]` passed.
+ /// The result is surrounded by brackets (`"[]"`), each
+ /// element is converted to a `String` via the
+ /// `String#valueOf(Object)` and separated by `", "`.
+ /// If the array is `null`, then `"null"` is returned.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String toString(Object[] array) {
if (array == null) {
return "null"; //$NON-NLS-1$
@@ -3494,42 +3736,54 @@ public static String toString(Object[] array) {
return sb.toString();
}
- /**
- * Creates a "deep" {@code String} representation of the
- * {@code Object[]} passed, such that if the array contains other arrays,
- * the {@code String} representation of those arrays is generated as well.
- *
- * If any of the elements are primitive arrays, the generation is delegated
- * to the other {@code toString} methods in this class. If any element
- * contains a reference to the original array, then it will be represented
- * as {@code "[...]"}. If an element is an {@code Object[]}, then its
- * representation is generated by a recursive call to this method. All other
- * elements are converted via the {@link String#valueOf(Object)} method.
- *
- * @param array
- * the {@code Object} array to convert.
- * @return the {@code String} representation of {@code array}.
- * @since 1.5
- */
+ /// Creates a *"deep"* `String` representation of the
+ /// `Object[]` passed, such that if the array contains other arrays,
+ /// the `String` representation of those arrays is generated as well.
+ ///
+ /// If any of the elements are primitive arrays, the generation is delegated
+ /// to the other `toString` methods in this class. If any element
+ /// contains a reference to the original array, then it will be represented
+ /// as `"[...]"`. If an element is an `Object[]`, then its
+ /// representation is generated by a recursive call to this method. All other
+ /// elements are converted via the `String#valueOf(Object)` method.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object` array to convert.
+ ///
+ /// #### Returns
+ ///
+ /// the `String` representation of `array`.
+ ///
+ /// #### Since
+ ///
+ /// 1.5
public static String deepToString(Object[] array) {
// delegate this to the recursive method
return deepToStringImpl(array, new Object[] { array }, null);
}
- /**
- * Implementation method used by {@link #deepToString(Object[])}.
- *
- * @param array
- * the {@code Object[]} to dive into.
- * @param origArrays
- * the original {@code Object[]}; used to test for self
- * references.
- * @param sb
- * the {@code StringBuilder} instance to append to or
- * {@code null} one hasn't been created yet.
- * @return the result.
- * @see #deepToString(Object[])
- */
+ /// Implementation method used by `#deepToString(Object[])`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the `Object[]` to dive into.
+ ///
+ /// - `origArrays`: @param origArrays
+ /// the original `Object[]`; used to test for self
+ /// references.
+ ///
+ /// - `sb`: @param sb
+ /// the `StringBuilder` instance to append to or
+ /// `null` one hasn't been created yet.
+ ///
+ /// #### Returns
+ ///
+ /// the result.
+ ///
+ /// #### See also
+ ///
+ /// - #deepToString(Object[])
private static String deepToStringImpl(Object[] array, Object[] origArrays,
StringBuffer sb) {
if (array == null) {
@@ -3582,17 +3836,19 @@ private static String deepToStringImpl(Object[] array, Object[] origArrays,
return sb.toString();
}
- /**
- * Utility method used to assist the implementation of
- * {@link #deepToString(Object[])}.
- *
- * @param origArrays
- * An array of Object[] references.
- * @param array
- * An Object[] reference to look for in {@code origArrays}.
- * @return A value of {@code true} if {@code array} is an
- * element in {@code origArrays}.
- */
+ /// Utility method used to assist the implementation of
+ /// `#deepToString(Object[])`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `origArrays`: An array of Object[] references.
+ ///
+ /// - `array`: An Object[] reference to look for in `origArrays`.
+ ///
+ /// #### Returns
+ ///
+ /// @return A value of `true` if `array` is an
+ /// element in `origArrays`.
private static boolean deepToStringImplContains(Object[] origArrays,
Object array) {
if (origArrays == null || origArrays.length == 0) {
@@ -3607,28 +3863,35 @@ private static boolean deepToStringImplContains(Object[] origArrays,
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is false.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is false.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static boolean[] copyOfRange(boolean[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3643,28 +3906,35 @@ public static boolean[] copyOfRange(boolean[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is (byte)0.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is (byte)0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static byte[] copyOfRange(byte[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3679,28 +3949,35 @@ public static byte[] copyOfRange(byte[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is '\\u000'.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is '\\u000'.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static char[] copyOfRange(char[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3715,28 +3992,35 @@ public static char[] copyOfRange(char[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is 0d.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is 0d.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static double[] copyOfRange(double[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3751,28 +4035,35 @@ public static double[] copyOfRange(double[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is 0f.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is 0f.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static float[] copyOfRange(float[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3787,28 +4078,35 @@ public static float[] copyOfRange(float[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is 0.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is 0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static int[] copyOfRange(int[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3823,28 +4121,35 @@ public static int[] copyOfRange(int[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is 0L.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is 0L.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static long[] copyOfRange(long[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
@@ -3859,28 +4164,35 @@ public static long[] copyOfRange(long[] original, int start, int end) {
throw new IllegalArgumentException();
}
- /**
- * Copies elements in original array to a new array, from index
- * start(inclusive) to end(exclusive). The first element (if any) in the new
- * array is original[from], and other elements in the new array are in the
- * original order. The padding value whose index is bigger than or equal to
- * original.length - start is (short)0.
- *
- * @param original
- * the original array
- * @param start
- * the start index, inclusive
- * @param end
- * the end index, exclusive, may bigger than length of the array
- * @return the new copied array
- * @throws ArrayIndexOutOfBoundsException
- * if start is smaller than 0 or bigger than original.length
- * @throws IllegalArgumentException
- * if start is bigger than end
- * @throws NullPointerException
- * if original is null
- * @since 1.6
- */
+ /// Copies elements in original array to a new array, from index
+ /// start(inclusive) to end(exclusive). The first element (if any) in the new
+ /// array is original[from], and other elements in the new array are in the
+ /// original order. The padding value whose index is bigger than or equal to
+ /// original.length - start is (short)0.
+ ///
+ /// #### Parameters
+ ///
+ /// - `original`: the original array
+ ///
+ /// - `start`: the start index, inclusive
+ ///
+ /// - `end`: the end index, exclusive, may bigger than length of the array
+ ///
+ /// #### Returns
+ ///
+ /// the new copied array
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayIndexOutOfBoundsException`: if start is smaller than 0 or bigger than original.length
+ ///
+ /// - `IllegalArgumentException`: if start is bigger than end
+ ///
+ /// - `NullPointerException`: if original is null
+ ///
+ /// #### Since
+ ///
+ /// 1.6
public static short[] copyOfRange(short[] original, int start, int end) {
if (start <= end) {
if (original.length >= start && 0 <= start) {
diff --git a/Ports/CLDC11/src/java/util/BitSet.java b/Ports/CLDC11/src/java/util/BitSet.java
index 47b25c5248..162043b6ac 100644
--- a/Ports/CLDC11/src/java/util/BitSet.java
+++ b/Ports/CLDC11/src/java/util/BitSet.java
@@ -18,12 +18,10 @@
package java.util;
-/**
- * The {@code BitSet} class implements a bit field. Each element in a
- * {@code BitSet} can be on(1) or off(0). A {@code BitSet} is created with a
- * given size and grows if this size is exceeded. Growth is always rounded to a
- * 64 bit boundary.
- */
+/// The `BitSet` class implements a bit field. Each element in a
+/// `BitSet` can be on(1) or off(0). A `BitSet` is created with a
+/// given size and grows if this size is exceeded. Growth is always rounded to a
+/// 64 bit boundary.
public class BitSet {
private static final int OFFSET = 6;
@@ -55,40 +53,56 @@ public class BitSet {
private transient boolean isLengthActual;
- /**
- * Create a new {@code BitSet} with size equal to 64 bits.
- *
- * @see #clear(int)
- * @see #set(int)
- * @see #clear()
- * @see #clear(int, int)
- * @see #set(int, boolean)
- * @see #set(int, int)
- * @see #set(int, int, boolean)
- */
+ /// Create a new `BitSet` with size equal to 64 bits.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
+ ///
+ /// - #set(int)
+ ///
+ /// - #clear()
+ ///
+ /// - #clear(int, int)
+ ///
+ /// - #set(int, boolean)
+ ///
+ /// - #set(int, int)
+ ///
+ /// - #set(int, int, boolean)
public BitSet() {
bits = new long[1];
actualArrayLength = 0;
isLengthActual = true;
}
- /**
- * Create a new {@code BitSet} with size equal to nbits. If nbits is not a
- * multiple of 64, then create a {@code BitSet} with size nbits rounded to
- * the next closest multiple of 64.
- *
- * @param nbits
- * the size of the bit set.
- * @throws NegativeArraySizeException
- * if {@code nbits} is negative.
- * @see #clear(int)
- * @see #set(int)
- * @see #clear()
- * @see #clear(int, int)
- * @see #set(int, boolean)
- * @see #set(int, int)
- * @see #set(int, int, boolean)
- */
+ /// Create a new `BitSet` with size equal to nbits. If nbits is not a
+ /// multiple of 64, then create a `BitSet` with size nbits rounded to
+ /// the next closest multiple of 64.
+ ///
+ /// #### Parameters
+ ///
+ /// - `nbits`: the size of the bit set.
+ ///
+ /// #### Throws
+ ///
+ /// - `NegativeArraySizeException`: if `nbits` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
+ ///
+ /// - #set(int)
+ ///
+ /// - #clear()
+ ///
+ /// - #clear(int, int)
+ ///
+ /// - #set(int, boolean)
+ ///
+ /// - #set(int, int)
+ ///
+ /// - #set(int, int, boolean)
public BitSet(int nbits) {
if (nbits < 0) {
throw new NegativeArraySizeException();
@@ -98,12 +112,11 @@ public BitSet(int nbits) {
isLengthActual = true;
}
- /**
- * Private constructor called from get(int, int) method
- *
- * @param bits
- * the size of the bit set
- */
+ /// Private constructor called from get(int, int) method
+ ///
+ /// #### Parameters
+ ///
+ /// - `bits`: the size of the bit set
private BitSet(long[] bits, boolean needClear, int actualArrayLength,
boolean isLengthActual) {
this.bits = bits;
@@ -112,17 +125,22 @@ private BitSet(long[] bits, boolean needClear, int actualArrayLength,
this.isLengthActual = isLengthActual;
}
- /**
- * Compares the argument to this {@code BitSet} and returns whether they are
- * equal. The object must be an instance of {@code BitSet} with the same
- * bits set.
- *
- * @param obj
- * the {@code BitSet} object to compare.
- * @return a {@code boolean} indicating whether or not this {@code BitSet} and
- * {@code obj} are equal.
- * @see #hashCode
- */
+ /// Compares the argument to this `BitSet` and returns whether they are
+ /// equal. The object must be an instance of `BitSet` with the same
+ /// bits set.
+ ///
+ /// #### Parameters
+ ///
+ /// - `obj`: the `BitSet` object to compare.
+ ///
+ /// #### Returns
+ ///
+ /// @return a `boolean` indicating whether or not this `BitSet` and
+ /// `obj` are equal.
+ ///
+ /// #### See also
+ ///
+ /// - #hashCode
@Override
public boolean equals(Object obj) {
if (this == obj) {
@@ -165,28 +183,31 @@ public boolean equals(Object obj) {
return false;
}
- /**
- * Increase the size of the internal array to accommodate {@code pos} bits.
- * The new array max index will be a multiple of 64.
- *
- * @param len
- * the index the new array needs to be able to access.
- */
+ /// Increase the size of the internal array to accommodate `pos` bits.
+ /// The new array max index will be a multiple of 64.
+ ///
+ /// #### Parameters
+ ///
+ /// - `len`: the index the new array needs to be able to access.
private final void growLength(int len) {
long[] tempBits = new long[Math.max(len, bits.length * 2)];
System.arraycopy(bits, 0, tempBits, 0, this.actualArrayLength);
bits = tempBits;
}
- /**
- * Computes the hash code for this {@code BitSet}. If two {@code BitSet}s are equal
- * the have to return the same result for {@code hashCode()}.
- *
- * @return the {@code int} representing the hash code for this bit
- * set.
- * @see #equals
- * @see java.util.Hashtable
- */
+ /// Computes the hash code for this `BitSet`. If two `BitSet`s are equal
+ /// the have to return the same result for `hashCode()`.
+ ///
+ /// #### Returns
+ ///
+ /// @return the `int` representing the hash code for this bit
+ /// set.
+ ///
+ /// #### See also
+ ///
+ /// - #equals
+ ///
+ /// - java.util.Hashtable
@Override
public int hashCode() {
long x = 1234;
@@ -196,24 +217,37 @@ public int hashCode() {
return (int) ((x >> 32) ^ x);
}
- /**
- * Retrieves the bit at index {@code pos}. Grows the {@code BitSet} if
- * {@code pos > size}.
- *
- * @param pos
- * the index of the bit to be retrieved.
- * @return {@code true} if the bit at {@code pos} is set,
- * {@code false} otherwise.
- * @throws IndexOutOfBoundsException
- * if {@code pos} is negative.
- * @see #clear(int)
- * @see #set(int)
- * @see #clear()
- * @see #clear(int, int)
- * @see #set(int, boolean)
- * @see #set(int, int)
- * @see #set(int, int, boolean)
- */
+ /// Retrieves the bit at index `pos`. Grows the `BitSet` if
+ /// `pos > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the index of the bit to be retrieved.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the bit at `pos` is set,
+ /// `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `pos` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
+ ///
+ /// - #set(int)
+ ///
+ /// - #clear()
+ ///
+ /// - #clear(int, int)
+ ///
+ /// - #set(int, boolean)
+ ///
+ /// - #set(int, int)
+ ///
+ /// - #set(int, int, boolean)
public boolean get(int pos) {
if (pos < 0) {
// Negative index specified
@@ -227,21 +261,29 @@ public boolean get(int pos) {
return false;
}
- /**
- * Retrieves the bits starting from {@code pos1} to {@code pos2} and returns
- * back a new bitset made of these bits. Grows the {@code BitSet} if
- * {@code pos2 > size}.
- *
- * @param pos1
- * beginning position.
- * @param pos2
- * ending position.
- * @return new bitset of the range specified.
- * @throws IndexOutOfBoundsException
- * if {@code pos1} or {@code pos2} is negative, or if
- * {@code pos2} is smaller than {@code pos1}.
- * @see #get(int)
- */
+ /// Retrieves the bits starting from `pos1` to `pos2` and returns
+ /// back a new bitset made of these bits. Grows the `BitSet` if
+ /// `pos2 > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos1`: beginning position.
+ ///
+ /// - `pos2`: ending position.
+ ///
+ /// #### Returns
+ ///
+ /// new bitset of the range specified.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `pos1` or `pos2` is negative, or if
+ /// `pos2` is smaller than `pos1`.
+ ///
+ /// #### See also
+ ///
+ /// - #get(int)
public BitSet get(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
throw new IndexOutOfBoundsException("" + pos1 + " and: " + pos2);
@@ -301,18 +343,24 @@ public BitSet get(int pos1, int pos2) {
newbits[actualLen - 1] != 0);
}
- /**
- * Sets the bit at index {@code pos} to 1. Grows the {@code BitSet} if
- * {@code pos > size}.
- *
- * @param pos
- * the index of the bit to set.
- * @throws IndexOutOfBoundsException
- * if {@code pos} is negative.
- * @see #clear(int)
- * @see #clear()
- * @see #clear(int, int)
- */
+ /// Sets the bit at index `pos` to 1. Grows the `BitSet` if
+ /// `pos > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the index of the bit to set.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `pos` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
+ ///
+ /// - #clear()
+ ///
+ /// - #clear(int, int)
public void set(int pos) {
if (pos < 0) {
throw new IndexOutOfBoundsException("" + pos);
@@ -330,18 +378,22 @@ public void set(int pos) {
needClear();
}
- /**
- * Sets the bit at index {@code pos} to {@code val}. Grows the
- * {@code BitSet} if {@code pos > size}.
- *
- * @param pos
- * the index of the bit to set.
- * @param val
- * value to set the bit.
- * @throws IndexOutOfBoundsException
- * if {@code pos} is negative.
- * @see #set(int)
- */
+ /// Sets the bit at index `pos` to `val`. Grows the
+ /// `BitSet` if `pos > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the index of the bit to set.
+ ///
+ /// - `val`: value to set the bit.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `pos` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #set(int)
public void set(int pos, boolean val) {
if (val) {
set(pos);
@@ -350,19 +402,24 @@ public void set(int pos, boolean val) {
}
}
- /**
- * Sets the bits starting from {@code pos1} to {@code pos2}. Grows the
- * {@code BitSet} if {@code pos2 > size}.
- *
- * @param pos1
- * beginning position.
- * @param pos2
- * ending position.
- * @throws IndexOutOfBoundsException
- * if {@code pos1} or {@code pos2} is negative, or if
- * {@code pos2} is smaller than {@code pos1}.
- * @see #set(int)
- */
+ /// Sets the bits starting from `pos1` to `pos2`. Grows the
+ /// `BitSet` if `pos2 > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos1`: beginning position.
+ ///
+ /// - `pos2`: ending position.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `pos1` or `pos2` is negative, or if
+ /// `pos2` is smaller than `pos1`.
+ ///
+ /// #### See also
+ ///
+ /// - #set(int)
public void set(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
throw new IndexOutOfBoundsException("" + pos1 + " and: " + pos2);
@@ -401,21 +458,26 @@ private void needClear() {
this.needClear = true;
}
- /**
- * Sets the bits starting from {@code pos1} to {@code pos2} to the given
- * {@code val}. Grows the {@code BitSet} if {@code pos2 > size}.
- *
- * @param pos1
- * beginning position.
- * @param pos2
- * ending position.
- * @param val
- * value to set these bits.
- * @throws IndexOutOfBoundsException
- * if {@code pos1} or {@code pos2} is negative, or if
- * {@code pos2} is smaller than {@code pos1}.
- * @see #set(int,int)
- */
+ /// Sets the bits starting from `pos1` to `pos2` to the given
+ /// `val`. Grows the `BitSet` if `pos2 > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos1`: beginning position.
+ ///
+ /// - `pos2`: ending position.
+ ///
+ /// - `val`: value to set these bits.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `pos1` or `pos2` is negative, or if
+ /// `pos2` is smaller than `pos1`.
+ ///
+ /// #### See also
+ ///
+ /// - #set(int,int)
public void set(int pos1, int pos2, boolean val) {
if (val) {
set(pos1, pos2);
@@ -424,12 +486,13 @@ public void set(int pos1, int pos2, boolean val) {
}
}
- /**
- * Clears all the bits in this {@code BitSet}.
- *
- * @see #clear(int)
- * @see #clear(int, int)
- */
+ /// Clears all the bits in this `BitSet`.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
+ ///
+ /// - #clear(int, int)
public void clear() {
if (needClear) {
for (int i = 0; i < bits.length; i++) {
@@ -441,16 +504,20 @@ public void clear() {
}
}
- /**
- * Clears the bit at index {@code pos}. Grows the {@code BitSet} if
- * {@code pos > size}.
- *
- * @param pos
- * the index of the bit to clear.
- * @throws IndexOutOfBoundsException
- * if {@code pos} is negative.
- * @see #clear(int, int)
- */
+ /// Clears the bit at index `pos`. Grows the `BitSet` if
+ /// `pos > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the index of the bit to clear.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `pos` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int, int)
public void clear(int pos) {
if (pos < 0) {
// Negative index specified
@@ -469,19 +536,24 @@ public void clear(int pos) {
}
}
- /**
- * Clears the bits starting from {@code pos1} to {@code pos2}. Grows the
- * {@code BitSet} if {@code pos2 > size}.
- *
- * @param pos1
- * beginning position.
- * @param pos2
- * ending position.
- * @throws IndexOutOfBoundsException
- * if {@code pos1} or {@code pos2} is negative, or if
- * {@code pos2} is smaller than {@code pos1}.
- * @see #clear(int)
- */
+ /// Clears the bits starting from `pos1` to `pos2`. Grows the
+ /// `BitSet` if `pos2 > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos1`: beginning position.
+ ///
+ /// - `pos2`: ending position.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `pos1` or `pos2` is negative, or if
+ /// `pos2` is smaller than `pos1`.
+ ///
+ /// #### See also
+ ///
+ /// - #clear(int)
public void clear(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
throw new IndexOutOfBoundsException("" + pos1 + " and: " + pos2);
@@ -517,16 +589,20 @@ public void clear(int pos1, int pos2) {
}
}
- /**
- * Flips the bit at index {@code pos}. Grows the {@code BitSet} if
- * {@code pos > size}.
- *
- * @param pos
- * the index of the bit to flip.
- * @throws IndexOutOfBoundsException
- * if {@code pos} is negative.
- * @see #flip(int, int)
- */
+ /// Flips the bit at index `pos`. Grows the `BitSet` if
+ /// `pos > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the index of the bit to flip.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: if `pos` is negative.
+ ///
+ /// #### See also
+ ///
+ /// - #flip(int, int)
public void flip(int pos) {
if (pos < 0) {
throw new IndexOutOfBoundsException("" + pos);
@@ -544,19 +620,24 @@ public void flip(int pos) {
needClear();
}
- /**
- * Flips the bits starting from {@code pos1} to {@code pos2}. Grows the
- * {@code BitSet} if {@code pos2 > size}.
- *
- * @param pos1
- * beginning position.
- * @param pos2
- * ending position.
- * @throws IndexOutOfBoundsException
- * if {@code pos1} or {@code pos2} is negative, or if
- * {@code pos2} is smaller than {@code pos1}.
- * @see #flip(int)
- */
+ /// Flips the bits starting from `pos1` to `pos2`. Grows the
+ /// `BitSet` if `pos2 > size`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos1`: beginning position.
+ ///
+ /// - `pos2`: ending position.
+ ///
+ /// #### Throws
+ ///
+ /// - `IndexOutOfBoundsException`: @throws IndexOutOfBoundsException
+ /// if `pos1` or `pos2` is negative, or if
+ /// `pos2` is smaller than `pos1`.
+ ///
+ /// #### See also
+ ///
+ /// - #flip(int)
public void flip(int pos1, int pos2) {
if (pos1 < 0 || pos2 < 0 || pos2 < pos1) {
throw new IndexOutOfBoundsException("" + pos1 + " and: " + pos2);
@@ -591,15 +672,17 @@ public void flip(int pos1, int pos2) {
needClear();
}
- /**
- * Checks if these two {@code BitSet}s have at least one bit set to true in the same
- * position.
- *
- * @param bs
- * {@code BitSet} used to calculate the intersection.
- * @return {@code true} if bs intersects with this {@code BitSet},
- * {@code false} otherwise.
- */
+ /// Checks if these two `BitSet`s have at least one bit set to true in the same
+ /// position.
+ ///
+ /// #### Parameters
+ ///
+ /// - `bs`: `BitSet` used to calculate the intersection.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if bs intersects with this `BitSet`,
+ /// `false` otherwise.
public boolean intersects(BitSet bs) {
long[] bsBits = bs.bits;
int length1 = actualArrayLength, length2 = bs.actualArrayLength;
@@ -621,15 +704,18 @@ public boolean intersects(BitSet bs) {
return false;
}
- /**
- * Performs the logical AND of this {@code BitSet} with another
- * {@code BitSet}. The values of this {@code BitSet} are changed accordingly.
- *
- * @param bs
- * {@code BitSet} to AND with.
- * @see #or
- * @see #xor
- */
+ /// Performs the logical AND of this `BitSet` with another
+ /// `BitSet`. The values of this `BitSet` are changed accordingly.
+ ///
+ /// #### Parameters
+ ///
+ /// - `bs`: `BitSet` to AND with.
+ ///
+ /// #### See also
+ ///
+ /// - #or
+ ///
+ /// - #xor
public void and(BitSet bs) {
long[] bsBits = bs.bits;
if (!needClear) {
@@ -652,13 +738,12 @@ public void and(BitSet bs) {
isLengthActual = !((actualArrayLength > 0) && (bits[actualArrayLength - 1] == 0));
}
- /**
- * Clears all bits in the receiver which are also set in the parameter
- * {@code BitSet}. The values of this {@code BitSet} are changed accordingly.
- *
- * @param bs
- * {@code BitSet} to ANDNOT with.
- */
+ /// Clears all bits in the receiver which are also set in the parameter
+ /// `BitSet`. The values of this `BitSet` are changed accordingly.
+ ///
+ /// #### Parameters
+ ///
+ /// - `bs`: `BitSet` to ANDNOT with.
public void andNot(BitSet bs) {
long[] bsBits = bs.bits;
if (!needClear) {
@@ -676,15 +761,18 @@ public void andNot(BitSet bs) {
isLengthActual = !((actualArrayLength > 0) && (bits[actualArrayLength - 1] == 0));
}
- /**
- * Performs the logical OR of this {@code BitSet} with another {@code BitSet}.
- * The values of this {@code BitSet} are changed accordingly.
- *
- * @param bs
- * {@code BitSet} to OR with.
- * @see #xor
- * @see #and
- */
+ /// Performs the logical OR of this `BitSet` with another `BitSet`.
+ /// The values of this `BitSet` are changed accordingly.
+ ///
+ /// #### Parameters
+ ///
+ /// - `bs`: `BitSet` to OR with.
+ ///
+ /// #### See also
+ ///
+ /// - #xor
+ ///
+ /// - #and
public void or(BitSet bs) {
int bsActualLen = bs.getActualArrayLength();
if (bsActualLen > bits.length) {
@@ -709,15 +797,18 @@ public void or(BitSet bs) {
needClear();
}
- /**
- * Performs the logical XOR of this {@code BitSet} with another {@code BitSet}.
- * The values of this {@code BitSet} are changed accordingly.
- *
- * @param bs
- * {@code BitSet} to XOR with.
- * @see #or
- * @see #and
- */
+ /// Performs the logical XOR of this `BitSet` with another `BitSet`.
+ /// The values of this `BitSet` are changed accordingly.
+ ///
+ /// #### Parameters
+ ///
+ /// - `bs`: `BitSet` to XOR with.
+ ///
+ /// #### See also
+ ///
+ /// - #or
+ ///
+ /// - #and
public void xor(BitSet bs) {
int bsActualLen = bs.getActualArrayLength();
if (bsActualLen > bits.length) {
@@ -742,21 +833,24 @@ public void xor(BitSet bs) {
needClear();
}
- /**
- * Returns the number of bits this {@code BitSet} has.
- *
- * @return the number of bits contained in this {@code BitSet}.
- * @see #length
- */
+ /// Returns the number of bits this `BitSet` has.
+ ///
+ /// #### Returns
+ ///
+ /// the number of bits contained in this `BitSet`.
+ ///
+ /// #### See also
+ ///
+ /// - #length
public int size() {
return bits.length << OFFSET;
}
- /**
- * Returns the number of bits up to and including the highest bit set.
- *
- * @return the length of the {@code BitSet}.
- */
+ /// Returns the number of bits up to and including the highest bit set.
+ ///
+ /// #### Returns
+ ///
+ /// the length of the `BitSet`.
public int length() {
int idx = actualArrayLength - 1;
while (idx >= 0 && bits[idx] == 0) {
@@ -787,12 +881,12 @@ private final int getActualArrayLength() {
return actualArrayLength;
}
- /**
- * Returns a string containing a concise, human-readable description of the
- * receiver.
- *
- * @return a comma delimited list of the indices of all bits that are set.
- */
+ /// Returns a string containing a concise, human-readable description of the
+ /// receiver.
+ ///
+ /// #### Returns
+ ///
+ /// a comma delimited list of the indices of all bits that are set.
@Override
public String toString() {
StringBuffer sb = new StringBuffer(bits.length / 2);
@@ -819,13 +913,15 @@ public String toString() {
return sb.toString();
}
- /**
- * Returns the position of the first bit that is {@code true} on or after {@code pos}.
- *
- * @param pos
- * the starting position (inclusive).
- * @return -1 if there is no bits that are set to {@code true} on or after {@code pos}.
- */
+ /// Returns the position of the first bit that is `true` on or after `pos`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the starting position (inclusive).
+ ///
+ /// #### Returns
+ ///
+ /// -1 if there is no bits that are set to `true` on or after `pos`.
public int nextSetBit(int pos) {
if (pos < 0) {
throw new IndexOutOfBoundsException("" + pos);
@@ -864,14 +960,16 @@ public int nextSetBit(int pos) {
return -1;
}
- /**
- * Returns the position of the first bit that is {@code false} on or after {@code pos}.
- *
- * @param pos
- * the starting position (inclusive).
- * @return the position of the next bit set to {@code false}, even if it is further
- * than this {@code BitSet}'s size.
- */
+ /// Returns the position of the first bit that is `false` on or after `pos`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `pos`: the starting position (inclusive).
+ ///
+ /// #### Returns
+ ///
+ /// @return the position of the next bit set to `false`, even if it is further
+ /// than this `BitSet`'s size.
public int nextClearBit(int pos) {
if (pos < 0) {
throw new IndexOutOfBoundsException("" + pos);
@@ -911,12 +1009,12 @@ public int nextClearBit(int pos) {
return bssize;
}
- /**
- * Returns true if all the bits in this {@code BitSet} are set to false.
- *
- * @return {@code true} if the {@code BitSet} is empty,
- * {@code false} otherwise.
- */
+ /// Returns true if all the bits in this `BitSet` are set to false.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the `BitSet` is empty,
+ /// `false` otherwise.
public boolean isEmpty() {
if (!needClear) {
return true;
@@ -930,11 +1028,11 @@ public boolean isEmpty() {
return true;
}
- /**
- * Returns the number of bits that are {@code true} in this {@code BitSet}.
- *
- * @return the number of {@code true} bits in the set.
- */
+ /// Returns the number of bits that are `true` in this `BitSet`.
+ ///
+ /// #### Returns
+ ///
+ /// the number of `true` bits in the set.
public int cardinality() {
if (!needClear) {
return 0;
diff --git a/Ports/CLDC11/src/java/util/Calendar.java b/Ports/CLDC11/src/java/util/Calendar.java
index ccba1b7a5c..3d76bee305 100644
--- a/Ports/CLDC11/src/java/util/Calendar.java
+++ b/Ports/CLDC11/src/java/util/Calendar.java
@@ -22,405 +22,301 @@
* have any questions.
*/
package java.util;
-/**
- * Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on. (A Date object represents a specific instant in time with millisecond precision. See Date for information about the Date class.)
- * Subclasses of Calendar interpret a Date according to the rules of a specific calendar system.
- * Like other locale-sensitive classes, Calendar provides a class method, getInstance, for getting a generally useful object of this type.
- * A Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
- * When computing a Date from time fields, there may be insufficient information to compute the Date (such as only year and month but no day in the month).
- * Insufficient information. The calendar will use default information to specify the missing fields. This may vary by calendar; for the Gregorian calendar, the default for a field is the same as that of the start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. Note: The ambiguity in interpretation of what day midnight belongs to, is resolved as so: midnight "belongs" to the following day. 23:59 on Dec 31, 1969 00:00 on Jan 1, 1970. 12:00 PM is midday, and 12:00 AM is midnight. 11:59 PM on Jan 1 12:00 AM on Jan 2 12:01 AM on Jan 2. 11:59 AM on Mar 10 12:00 PM on Mar 10 12:01 PM on Mar 10. 24:00 or greater are invalid. Hours greater than 12 are invalid in AM/PM mode. Setting the time will never change the date.
- * If equivalent times are entered in AM/PM or 24 hour mode, equality will be determined by the actual time rather than the entered time.
- * This class has been subset for J2ME based on the JDK 1.3 Calendar class. Many methods and variables have been pruned, and other methods simplified, in an effort to reduce the size of this class.
- * Version: CLDC 1.1 02/01/2002 (based on JDK 1.3) See Also:Date, TimeZone
- */
+/// Calendar is an abstract base class for converting between a Date object and a set of integer fields such as YEAR, MONTH, DAY, HOUR, and so on. (A Date object represents a specific instant in time with millisecond precision. See Date for information about the Date class.)
+/// Subclasses of Calendar interpret a Date according to the rules of a specific calendar system.
+/// Like other locale-sensitive classes, Calendar provides a class method, getInstance, for getting a generally useful object of this type.
+/// A Calendar object can produce all the time field values needed to implement the date-time formatting for a particular language and calendar style (for example, Japanese-Gregorian, Japanese-Traditional).
+/// When computing a Date from time fields, there may be insufficient information to compute the Date (such as only year and month but no day in the month).
+/// Insufficient information. The calendar will use default information to specify the missing fields. This may vary by calendar; for the Gregorian calendar, the default for a field is the same as that of the start of the epoch: i.e., YEAR = 1970, MONTH = JANUARY, DATE = 1, etc. Note: The ambiguity in interpretation of what day midnight belongs to, is resolved as so: midnight "belongs" to the following day. 23:59 on Dec 31, 1969 00:00 on Jan 1, 1970. 12:00 PM is midday, and 12:00 AM is midnight. 11:59 PM on Jan 1 12:00 AM on Jan 2 12:01 AM on Jan 2. 11:59 AM on Mar 10 12:00 PM on Mar 10 12:01 PM on Mar 10. 24:00 or greater are invalid. Hours greater than 12 are invalid in AM/PM mode. Setting the time will never change the date.
+/// If equivalent times are entered in AM/PM or 24 hour mode, equality will be determined by the actual time rather than the entered time.
+/// This class has been subset for J2ME based on the JDK 1.3 Calendar class. Many methods and variables have been pruned, and other methods simplified, in an effort to reduce the size of this class.
+/// Version: CLDC 1.1 02/01/2002 (based on JDK 1.3) See Also:Date, TimeZone
public abstract class Calendar{
- /**
- * Value of the AM_PM field indicating the period of the day from midnight to just before noon.
- * See Also:Constant Field Values
- */
+ /// Value of the AM_PM field indicating the period of the day from midnight to just before noon.
+ /// See Also:Constant Field Values
public static final int AM=0;
- /**
- * Field number for get and set indicating whether the HOUR is before or after noon. E.g., at 10:04:15.250 PM the AM_PM is PM.
- * See Also:AM, PM, HOUR, Constant Field Values
- */
+ /// Field number for get and set indicating whether the HOUR is before or after noon. E.g., at 10:04:15.250 PM the AM_PM is PM.
+ /// See Also:AM, PM, HOUR, Constant Field Values
public static final int AM_PM=9;
- /**
- * Value of the MONTH field indicating the fourth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the fourth month of the year.
+ /// See Also:Constant Field Values
public static final int APRIL=3;
- /**
- * Value of the MONTH field indicating the eighth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the eighth month of the year.
+ /// See Also:Constant Field Values
public static final int AUGUST=7;
- /**
- * Field number for {@code get} and {@code set} indicating the
- * week number within the current year. The first week of the year, as
- * defined by {@code getFirstDayOfWeek()} and
- * {@code getMinimalDaysInFirstWeek()}, has value 1. Subclasses
- * define the value of {@code WEEK_OF_YEAR} for days before the first
- * week of the year.
- *
- * @see #getFirstDayOfWeek
- * @see #getMinimalDaysInFirstWeek
- */
+ /// Field number for `get` and `set` indicating the
+ /// week number within the current year. The first week of the year, as
+ /// defined by `getFirstDayOfWeek()` and
+ /// `getMinimalDaysInFirstWeek()`, has value 1. Subclasses
+ /// define the value of `WEEK_OF_YEAR` for days before the first
+ /// week of the year.
+ ///
+ /// #### See also
+ ///
+ /// - #getFirstDayOfWeek
+ ///
+ /// - #getMinimalDaysInFirstWeek
public static final int WEEK_OF_YEAR = 3;
- /**
- * Field number for {@code get} and {@code set} indicating the
- * week number within the current month. The first week of the month, as
- * defined by {@code getFirstDayOfWeek()} and
- * {@code getMinimalDaysInFirstWeek()}, has value 1. Subclasses
- * define the value of {@code WEEK_OF_MONTH} for days before the
- * first week of the month.
- *
- * @see #getFirstDayOfWeek
- * @see #getMinimalDaysInFirstWeek
- */
+ /// Field number for `get` and `set` indicating the
+ /// week number within the current month. The first week of the month, as
+ /// defined by `getFirstDayOfWeek()` and
+ /// `getMinimalDaysInFirstWeek()`, has value 1. Subclasses
+ /// define the value of `WEEK_OF_MONTH` for days before the
+ /// first week of the month.
+ ///
+ /// #### See also
+ ///
+ /// - #getFirstDayOfWeek
+ ///
+ /// - #getMinimalDaysInFirstWeek
public static final int WEEK_OF_MONTH = 4;
- /**
- * Field number for get and set indicating the day of the month. This is a synonym for DAY_OF_MONTH.
- * See Also:DAY_OF_MONTH, Constant Field Values
- */
+ /// Field number for get and set indicating the day of the month. This is a synonym for DAY_OF_MONTH.
+ /// See Also:DAY_OF_MONTH, Constant Field Values
public static final int DATE=5;
- /**
- * Field number for get and set indicating the day of the month. This is a synonym for DATE.
- * See Also:DATE, Constant Field Values
- */
+ /// Field number for get and set indicating the day of the month. This is a synonym for DATE.
+ /// See Also:DATE, Constant Field Values
public static final int DAY_OF_MONTH=5;
- /**
- * Field number for {@code get} and {@code set} indicating the
- * day number within the current year. The first day of the year has value
- * 1.
- */
+ /// Field number for `get` and `set` indicating the
+ /// day number within the current year. The first day of the year has value
+ /// 1.
static final int DAY_OF_YEAR = 6;
- /**
- * Field number for get and set indicating the day of the week.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the day of the week.
+ /// See Also:Constant Field Values
public static final int DAY_OF_WEEK=7;
- /**
- * Field number for {@code get} and {@code set} indicating the
- * ordinal number of the day of the week within the current month. Together
- * with the {@code DAY_OF_WEEK} field, this uniquely specifies a day
- * within a month. Unlike {@code WEEK_OF_MONTH} and
- * {@code WEEK_OF_YEAR}, this field's value does not
- * depend on {@code getFirstDayOfWeek()} or
- * {@code getMinimalDaysInFirstWeek()}. {@code DAY_OF_MONTH 1}
- * through {@code 7} always correspond to DAY_OF_WEEK_IN_MONTH
- * 1;
- * {@code 8} through {@code 15} correspond to
- * {@code DAY_OF_WEEK_IN_MONTH 2}, and so on.
- * {@code DAY_OF_WEEK_IN_MONTH 0} indicates the week before
- * {@code DAY_OF_WEEK_IN_MONTH 1}. Negative values count back from
- * the end of the month, so the last Sunday of a month is specified as
- * {@code DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1}. Because
- * negative values count backward they will usually be aligned differently
- * within the month than positive values. For example, if a month has 31
- * days, {@code DAY_OF_WEEK_IN_MONTH -1} will overlap
- * {@code DAY_OF_WEEK_IN_MONTH 5} and the end of {@code 4}.
- *
- * @see #DAY_OF_WEEK
- * @see #WEEK_OF_MONTH
- */
+ /// Field number for `get` and `set` indicating the
+ /// ordinal number of the day of the week within the current month. Together
+ /// with the `DAY_OF_WEEK` field, this uniquely specifies a day
+ /// within a month. Unlike `WEEK_OF_MONTH` and
+ /// `WEEK_OF_YEAR`, this field's value does *not*
+ /// depend on `getFirstDayOfWeek()` or
+ /// `getMinimalDaysInFirstWeek()`. `DAY_OF_MONTH 1`
+ /// through `7` always correspond to `DAY_OF_WEEK_IN_MONTH 1`;
+ /// `8` through `15` correspond to
+ /// `DAY_OF_WEEK_IN_MONTH 2`, and so on.
+ /// `DAY_OF_WEEK_IN_MONTH 0` indicates the week before
+ /// `DAY_OF_WEEK_IN_MONTH 1`. Negative values count back from
+ /// the end of the month, so the last Sunday of a month is specified as
+ /// `DAY_OF_WEEK = SUNDAY, DAY_OF_WEEK_IN_MONTH = -1`. Because
+ /// negative values count backward they will usually be aligned differently
+ /// within the month than positive values. For example, if a month has 31
+ /// days, `DAY_OF_WEEK_IN_MONTH -1` will overlap
+ /// `DAY_OF_WEEK_IN_MONTH 5` and the end of `4`.
+ ///
+ /// #### See also
+ ///
+ /// - #DAY_OF_WEEK
+ ///
+ /// - #WEEK_OF_MONTH
public static final int DAY_OF_WEEK_IN_MONTH = 8;
- /**
- * Value of the MONTH field indicating the twelfth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the twelfth month of the year.
+ /// See Also:Constant Field Values
public static final int DECEMBER=11;
- /**
- * Value of the MONTH field indicating the second month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the second month of the year.
+ /// See Also:Constant Field Values
public static final int FEBRUARY=1;
- /**
- * The field values for the currently set time for this calendar.
- */
+ /// The field values for the currently set time for this calendar.
protected int[] fields;
- /**
- * Value of the DAY_OF_WEEK field indicating Friday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Friday.
+ /// See Also:Constant Field Values
public static final int FRIDAY=6;
- /**
- * Field number for get and set indicating the hour of the morning or afternoon. HOUR is used for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.
- * See Also:AM_PM, HOUR_OF_DAY, Constant Field Values
- */
+ /// Field number for get and set indicating the hour of the morning or afternoon. HOUR is used for the 12-hour clock. E.g., at 10:04:15.250 PM the HOUR is 10.
+ /// See Also:AM_PM, HOUR_OF_DAY, Constant Field Values
public static final int HOUR=10;
- /**
- * Field number for get and set indicating the hour of the day. HOUR_OF_DAY is used for the 24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the hour of the day. HOUR_OF_DAY is used for the 24-hour clock. E.g., at 10:04:15.250 PM the HOUR_OF_DAY is 22.
+ /// See Also:Constant Field Values
public static final int HOUR_OF_DAY=11;
- /**
- * The flags which tell if a specified time field for the calendar is set. This is an array of FIELD_COUNT booleans,
- */
+ /// The flags which tell if a specified time field for the calendar is set. This is an array of FIELD_COUNT booleans,
protected boolean[] isSet;
- /**
- * Value of the MONTH field indicating the first month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the first month of the year.
+ /// See Also:Constant Field Values
public static final int JANUARY=0;
- /**
- * Value of the MONTH field indicating the seventh month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the seventh month of the year.
+ /// See Also:Constant Field Values
public static final int JULY=6;
- /**
- * Value of the MONTH field indicating the sixth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the sixth month of the year.
+ /// See Also:Constant Field Values
public static final int JUNE=5;
- /**
- * Value of the MONTH field indicating the third month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the third month of the year.
+ /// See Also:Constant Field Values
public static final int MARCH=2;
- /**
- * Value of the MONTH field indicating the fifth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the fifth month of the year.
+ /// See Also:Constant Field Values
public static final int MAY=4;
- /**
- * Field number for get and set indicating the millisecond within the second. E.g., at 10:04:15.250 PM the MILLISECOND is 250.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the millisecond within the second. E.g., at 10:04:15.250 PM the MILLISECOND is 250.
+ /// See Also:Constant Field Values
public static final int MILLISECOND=14;
- /**
- * Field number for get and set indicating the minute within the hour. E.g., at 10:04:15.250 PM the MINUTE is 4.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the minute within the hour. E.g., at 10:04:15.250 PM the MINUTE is 4.
+ /// See Also:Constant Field Values
public static final int MINUTE=12;
- /**
- * Value of the DAY_OF_WEEK field indicating Monday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Monday.
+ /// See Also:Constant Field Values
public static final int MONDAY=2;
- /**
- * Field number for get and set indicating the month. This is a calendar-specific value.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the month. This is a calendar-specific value.
+ /// See Also:Constant Field Values
public static final int MONTH=2;
- /**
- * Value of the MONTH field indicating the eleventh month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the eleventh month of the year.
+ /// See Also:Constant Field Values
public static final int NOVEMBER=10;
- /**
- * Value of the MONTH field indicating the tenth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the tenth month of the year.
+ /// See Also:Constant Field Values
public static final int OCTOBER=9;
- /**
- * Value of the AM_PM field indicating the period of the day from noon to just before midnight.
- * See Also:Constant Field Values
- */
+ /// Value of the AM_PM field indicating the period of the day from noon to just before midnight.
+ /// See Also:Constant Field Values
public static final int PM=1;
- /**
- * Value of the DAY_OF_WEEK field indicating Saturday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Saturday.
+ /// See Also:Constant Field Values
public static final int SATURDAY=7;
- /**
- * Field number for get and set indicating the second within the minute. E.g., at 10:04:15.250 PM the SECOND is 15.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the second within the minute. E.g., at 10:04:15.250 PM the SECOND is 15.
+ /// See Also:Constant Field Values
public static final int SECOND=13;
- /**
- * Value of the MONTH field indicating the ninth month of the year.
- * See Also:Constant Field Values
- */
+ /// Value of the MONTH field indicating the ninth month of the year.
+ /// See Also:Constant Field Values
public static final int SEPTEMBER=8;
- /**
- * Value of the DAY_OF_WEEK field indicating Sunday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Sunday.
+ /// See Also:Constant Field Values
public static final int SUNDAY=1;
- /**
- * Value of the DAY_OF_WEEK field indicating Thursday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Thursday.
+ /// See Also:Constant Field Values
public static final int THURSDAY=5;
- /**
- * The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
- */
+ /// The currently set time for this calendar, expressed in milliseconds after January 1, 1970, 0:00:00 GMT.
protected long time;
- /**
- * Value of the DAY_OF_WEEK field indicating Tuesday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Tuesday.
+ /// See Also:Constant Field Values
public static final int TUESDAY=3;
- /**
- * Value of the DAY_OF_WEEK field indicating Wednesday.
- * See Also:Constant Field Values
- */
+ /// Value of the DAY_OF_WEEK field indicating Wednesday.
+ /// See Also:Constant Field Values
public static final int WEDNESDAY=4;
- /**
- * Field number for get and set indicating the year. This is a calendar-specific value.
- * See Also:Constant Field Values
- */
+ /// Field number for get and set indicating the year. This is a calendar-specific value.
+ /// See Also:Constant Field Values
public static final int YEAR=1;
- /**
- * Constructs a Calendar with the default time zone.
- * See Also:TimeZone.getDefault()
- */
+ /// Constructs a Calendar with the default time zone.
+ /// See Also:TimeZone.getDefault()
protected Calendar(){
//TODO codavaj!!
}
- /**
- * Compares the time field records. Equivalent to comparing result of conversion to UTC.
- */
+ /// Compares the time field records. Equivalent to comparing result of conversion to UTC.
public boolean after(java.lang.Object when){
return false; //TODO codavaj!!
}
- /**
- * Compares the time field records. Equivalent to comparing result of conversion to UTC.
- */
+ /// Compares the time field records. Equivalent to comparing result of conversion to UTC.
public boolean before(java.lang.Object when){
return false; //TODO codavaj!!
}
- /**
- * Converts the current millisecond time value time to field values in fields[]. This allows you to sync up the time field values with a new time that is set for the calendar.
- */
+ /// Converts the current millisecond time value time to field values in fields[]. This allows you to sync up the time field values with a new time that is set for the calendar.
protected abstract void computeFields();
- /**
- * Converts the current field values in fields[] to the millisecond time value time.
- */
+ /// Converts the current field values in fields[] to the millisecond time value time.
protected abstract void computeTime();
- /**
- * Compares this calendar to the specified object. The result is true if and only if the argument is not null and is a Calendar object that represents the same calendar as this object.
- */
+ /// Compares this calendar to the specified object. The result is true if and only if the argument is not null and is a Calendar object that represents the same calendar as this object.
public boolean equals(java.lang.Object obj){
return false; //TODO codavaj!!
}
- /**
- * Gets the value for a given time field.
- */
+ /// Gets the value for a given time field.
public final int get(int field){
return 0; //TODO codavaj!!
}
- /**
- * Gets a calendar using the default time zone.
- */
+ /// Gets a calendar using the default time zone.
public static java.util.Calendar getInstance(){
return null; //TODO codavaj!!
}
- /**
- * Gets a calendar using the specified time zone.
- */
+ /// Gets a calendar using the specified time zone.
public static java.util.Calendar getInstance(java.util.TimeZone zone){
return null; //TODO codavaj!!
}
- /**
- * Gets this Calendar's current time.
- */
+ /// Gets this Calendar's current time.
public final java.util.Date getTime(){
return null; //TODO codavaj!!
}
- /**
- * Gets this Calendar's current time as a long expressed in milliseconds after January 1, 1970, 0:00:00 GMT (the epoch).
- */
+ /// Gets this Calendar's current time as a long expressed in milliseconds after January 1, 1970, 0:00:00 GMT (the epoch).
protected long getTimeInMillis(){
return 0l; //TODO codavaj!!
}
- /**
- * Gets the time zone.
- */
+ /// Gets the time zone.
public java.util.TimeZone getTimeZone(){
return null; //TODO codavaj!!
}
- /**
- * Sets the time field with the given value.
- */
+ /// Sets the time field with the given value.
public final void set(int field, int value){
return; //TODO codavaj!!
}
- /**
- * Adds the specified amount to a {@code Calendar} field.
- *
- * @param field
- * the {@code Calendar} field to modify.
- * @param value
- * the amount to add to the field.
- * @throws IllegalArgumentException
- * if {@code field} is {@code DST_OFFSET} or {@code
- * ZONE_OFFSET}.
- */
+ /// Adds the specified amount to a `Calendar` field.
+ ///
+ /// #### Parameters
+ ///
+ /// - `field`: the `Calendar` field to modify.
+ ///
+ /// - `value`: the amount to add to the field.
+ ///
+ /// #### Throws
+ ///
+ /// - `IllegalArgumentException`: if `field` is `DST_OFFSET` or `ZONE_OFFSET`.
public final void add(int field, int value) {
}
- /**
- * Sets this Calendar's current time with the given Date.
- * Note: Calling setTime() with Date(Long.MAX_VALUE) or Date(Long.MIN_VALUE) may yield incorrect field values from get().
- */
+ /// Sets this Calendar's current time with the given Date.
+ /// Note: Calling setTime() with Date(Long.MAX_VALUE) or Date(Long.MIN_VALUE) may yield incorrect field values from get().
public final void setTime(java.util.Date date){
return; //TODO codavaj!!
}
- /**
- * Sets this Calendar's current time from the given long value.
- */
+ /// Sets this Calendar's current time from the given long value.
protected void setTimeInMillis(long millis){
return; //TODO codavaj!!
}
- /**
- * Sets the time zone with the given time zone value.
- */
+ /// Sets the time zone with the given time zone value.
public void setTimeZone(java.util.TimeZone value){
return; //TODO codavaj!!
}
diff --git a/Ports/CLDC11/src/java/util/Collection.java b/Ports/CLDC11/src/java/util/Collection.java
index 1297d21b50..55ac391203 100644
--- a/Ports/CLDC11/src/java/util/Collection.java
+++ b/Ports/CLDC11/src/java/util/Collection.java
@@ -18,299 +18,350 @@
package java.util;
-/**
- * {@code Collection} is the root of the collection hierarchy. It defines operations on
- * data collections and the behavior that they will have in all implementations
- * of {@code Collection}s.
- *
- * All direct or indirect implementations of {@code Collection} should implement at
- * least two constructors. One with no parameters which creates an empty
- * collection and one with a parameter of type {@code Collection}. This second
- * constructor can be used to create a collection of different type as the
- * initial collection but with the same elements. Implementations of {@code Collection}
- * cannot be forced to implement these two constructors but at least all
- * implementations under {@code java.util} do.
- *
- * Methods that change the content of a collection throw an
- * {@code UnsupportedOperationException} if the underlying collection does not
- * support that operation, though it's not mandatory to throw such an {@code Exception}
- * in cases where the requested operation would not change the collection. In
- * these cases it's up to the implementation whether it throws an
- * {@code UnsupportedOperationException} or not.
- *
- * Methods marked with (optional) can throw an
- * {@code UnsupportedOperationException} if the underlying collection doesn't
- * support that method.
- */
+/// `Collection` is the root of the collection hierarchy. It defines operations on
+/// data collections and the behavior that they will have in all implementations
+/// of `Collection`s.
+///
+/// All direct or indirect implementations of `Collection` should implement at
+/// least two constructors. One with no parameters which creates an empty
+/// collection and one with a parameter of type `Collection`. This second
+/// constructor can be used to create a collection of different type as the
+/// initial collection but with the same elements. Implementations of `Collection`
+/// cannot be forced to implement these two constructors but at least all
+/// implementations under `java.util` do.
+///
+/// Methods that change the content of a collection throw an
+/// `UnsupportedOperationException` if the underlying collection does not
+/// support that operation, though it's not mandatory to throw such an `Exception`
+/// in cases where the requested operation would not change the collection. In
+/// these cases it's up to the implementation whether it throws an
+/// `UnsupportedOperationException` or not.
+///
+/// Methods marked with (optional) can throw an
+/// `UnsupportedOperationException` if the underlying collection doesn't
+/// support that method.
public interface Collection extends java.lang.Iterable {
- /**
- * Attempts to add {@code object} to the contents of this
- * {@code Collection} (optional).
- *
- * After this method finishes successfully it is guaranteed that the object
- * is contained in the collection.
- *
- * If the collection was modified it returns {@code true}, {@code false} if
- * no changes were made.
- *
- * An implementation of {@code Collection} may narrow the set of accepted
- * objects, but it has to specify this in the documentation. If the object
- * to be added does not meet this restriction, then an
- * {@code IllegalArgumentException} is thrown.
- *
- * If a collection does not yet contain an object that is to be added and
- * adding the object fails, this method must throw an appropriate
- * unchecked Exception. Returning false is not permitted in this case
- * because it would violate the postcondition that the element will be part
- * of the collection after this method finishes.
- *
- * @param object
- * the object to add.
- * @return {@code true} if this {@code Collection} is
- * modified, {@code false} otherwise.
- *
- * @throws UnsupportedOperationException
- * if adding to this {@code Collection} is not supported.
- * @throws ClassCastException
- * if the class of the object is inappropriate for this
- * collection.
- * @throws IllegalArgumentException
- * if the object cannot be added to this {@code Collection}.
- * @throws NullPointerException
- * if null elements cannot be added to the {@code Collection}.
- */
+ /// Attempts to add `object` to the contents of this
+ /// `Collection` (optional).
+ ///
+ /// After this method finishes successfully it is guaranteed that the object
+ /// is contained in the collection.
+ ///
+ /// If the collection was modified it returns `true`, `false` if
+ /// no changes were made.
+ ///
+ /// An implementation of `Collection` may narrow the set of accepted
+ /// objects, but it has to specify this in the documentation. If the object
+ /// to be added does not meet this restriction, then an
+ /// `IllegalArgumentException` is thrown.
+ ///
+ /// If a collection does not yet contain an object that is to be added and
+ /// adding the object fails, this method *must* throw an appropriate
+ /// unchecked Exception. Returning false is not permitted in this case
+ /// because it would violate the postcondition that the element will be part
+ /// of the collection after this method finishes.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to add.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is
+ /// modified, `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of the object is inappropriate for this
+ /// collection.
+ ///
+ /// - `IllegalArgumentException`: if the object cannot be added to this `Collection`.
+ ///
+ /// - `NullPointerException`: if null elements cannot be added to the `Collection`.
public boolean add(E object);
- /**
- * Attempts to add all of the objects contained in {@code Collection}
- * to the contents of this {@code Collection} (optional). If the passed {@code Collection}
- * is changed during the process of adding elements to this {@code Collection}, the
- * behavior is not defined.
- *
- * @param collection
- * the {@code Collection} of objects.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if adding to this {@code Collection} is not supported.
- * @throws ClassCastException
- * if the class of an object is inappropriate for this
- * {@code Collection}.
- * @throws IllegalArgumentException
- * if an object cannot be added to this {@code Collection}.
- * @throws NullPointerException
- * if {@code collection} is {@code null}, or if it
- * contains {@code null} elements and this {@code Collection} does
- * not support such elements.
- */
+ /// Attempts to add all of the objects contained in `Collection`
+ /// to the contents of this `Collection` (optional). If the passed `Collection`
+ /// is changed during the process of adding elements to this `Collection`, the
+ /// behavior is not defined.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the `Collection` of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if adding to this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the class of an object is inappropriate for this
+ /// `Collection`.
+ ///
+ /// - `IllegalArgumentException`: if an object cannot be added to this `Collection`.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` is `null`, or if it
+ /// contains `null` elements and this `Collection` does
+ /// not support such elements.
public boolean addAll(Collection extends E> collection);
- /**
- * Removes all elements from this {@code Collection}, leaving it empty (optional).
- *
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- *
- * @see #isEmpty
- * @see #size
- */
+ /// Removes all elements from this `Collection`, leaving it empty (optional).
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// #### See also
+ ///
+ /// - #isEmpty
+ ///
+ /// - #size
public void clear();
- /**
- * Tests whether this {@code Collection} contains the specified object. Returns
- * {@code true} if and only if at least one element {@code elem} in this
- * {@code Collection} meets following requirement:
- * {@code (object==null ? elem==null : object.equals(elem))}.
- *
- * @param object
- * the object to search for.
- * @return {@code true} if object is an element of this {@code Collection},
- * {@code false} otherwise.
- * @throws ClassCastException
- * if the object to look for isn't of the correct
- * type.
- * @throws NullPointerException
- * if the object to look for is {@code null} and this
- * {@code Collection} doesn't support {@code null} elements.
- */
+ /// Tests whether this `Collection` contains the specified object. Returns
+ /// `true` if and only if at least one element `elem` in this
+ /// `Collection` meets following requirement:
+ /// `(object==null ? elem==null : object.equals(elem))`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to search for.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if object is an element of this `Collection`,
+ /// `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if the object to look for isn't of the correct
+ /// type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if the object to look for is `null` and this
+ /// `Collection` doesn't support `null` elements.
public boolean contains(Object object);
- /**
- * Tests whether this {@code Collection} contains all objects contained in the
- * specified {@code Collection}. If an element {@code elem} is contained several
- * times in the specified {@code Collection}, the method returns {@code true} even
- * if {@code elem} is contained only once in this {@code Collection}.
- *
- * @param collection
- * the collection of objects.
- * @return {@code true} if all objects in the specified {@code Collection} are
- * elements of this {@code Collection}, {@code false} otherwise.
- * @throws ClassCastException
- * if one or more elements of {@code collection} isn't of the
- * correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one {@code null}
- * element and this {@code Collection} doesn't support {@code null}
- * elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Tests whether this `Collection` contains all objects contained in the
+ /// specified `Collection`. If an element `elem` is contained several
+ /// times in the specified `Collection`, the method returns `true` even
+ /// if `elem` is contained only once in this `Collection`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if all objects in the specified `Collection` are
+ /// elements of this `Collection`, `false` otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection` isn't of the
+ /// correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one `null`
+ /// element and this `Collection` doesn't support `null`
+ /// elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean containsAll(Collection> collection);
- /**
- * Compares the argument to the receiver, and returns true if they represent
- * the same object using a class specific comparison.
- *
- * @param object
- * the object to compare with this object.
- * @return {@code true} if the object is the same as this object and
- * {@code false} if it is different from this object.
- * @see #hashCode
- */
+ /// Compares the argument to the receiver, and returns true if they represent
+ /// the *same* object using a class specific comparison.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to compare with this object.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if the object is the same as this object and
+ /// `false` if it is different from this object.
+ ///
+ /// #### See also
+ ///
+ /// - #hashCode
public boolean equals(Object object);
- /**
- * Returns an integer hash code for the receiver. Objects which are equal
- * return the same value for this method.
- *
- * @return the receiver's hash.
- *
- * @see #equals
- */
+ /// Returns an integer hash code for the receiver. Objects which are equal
+ /// return the same value for this method.
+ ///
+ /// #### Returns
+ ///
+ /// the receiver's hash.
+ ///
+ /// #### See also
+ ///
+ /// - #equals
public int hashCode();
- /**
- * Returns if this {@code Collection} contains no elements.
- *
- * @return {@code true} if this {@code Collection} has no elements, {@code false}
- * otherwise.
- *
- * @see #size
- */
+ /// Returns if this `Collection` contains no elements.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` has no elements, `false`
+ /// otherwise.
+ ///
+ /// #### See also
+ ///
+ /// - #size
public boolean isEmpty();
- /**
- * Returns an instance of {@link Iterator} that may be used to access the
- * objects contained by this {@code Collection}. The order in which the elements are
- * returned by the iterator is not defined. Only if the instance of the
- * {@code Collection} has a defined order the elements are returned in that order.
- *
- * @return an iterator for accessing the {@code Collection} contents.
- */
+ /// Returns an instance of `Iterator` that may be used to access the
+ /// objects contained by this `Collection`. The order in which the elements are
+ /// returned by the iterator is not defined. Only if the instance of the
+ /// `Collection` has a defined order the elements are returned in that order.
+ ///
+ /// #### Returns
+ ///
+ /// an iterator for accessing the `Collection` contents.
public Iterator iterator();
- /**
- * Removes one instance of the specified object from this {@code Collection} if one
- * is contained (optional). The element {@code elem} that is removed
- * complies with {@code (object==null ? elem==null : object.equals(elem)}.
- *
- * @param object
- * the object to remove.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if the object passed is not of the correct type.
- * @throws NullPointerException
- * if {@code object} is {@code null} and this {@code Collection}
- * doesn't support {@code null} elements.
- */
+ /// Removes one instance of the specified object from this `Collection` if one
+ /// is contained (optional). The element `elem` that is removed
+ /// complies with `(object==null ? elem==null : object.equals(elem)`.
+ ///
+ /// #### Parameters
+ ///
+ /// - `object`: the object to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: if the object passed is not of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `object` is `null` and this `Collection`
+ /// doesn't support `null` elements.
public boolean remove(Object object);
- /**
- * Removes all occurrences in this {@code Collection} of each object in the
- * specified {@code Collection} (optional). After this method returns none of the
- * elements in the passed {@code Collection} can be found in this {@code Collection}
- * anymore.
- *
- * @param collection
- * the collection of objects to remove.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- *
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if one or more elements of {@code collection}
- * isn't of the correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one
- * {@code null} element and this {@code Collection} doesn't support
- * {@code null} elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Removes all occurrences in this `Collection` of each object in the
+ /// specified `Collection` (optional). After this method returns none of the
+ /// elements in the passed `Collection` can be found in this `Collection`
+ /// anymore.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects to remove.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection`
+ /// isn't of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one
+ /// `null` element and this `Collection` doesn't support
+ /// `null` elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean removeAll(Collection> collection);
- /**
- * Removes all objects from this {@code Collection} that are not also found in the
- * {@code Collection} passed (optional). After this method returns this {@code Collection}
- * will only contain elements that also can be found in the {@code Collection}
- * passed to this method.
- *
- * @param collection
- * the collection of objects to retain.
- * @return {@code true} if this {@code Collection} is modified, {@code false}
- * otherwise.
- * @throws UnsupportedOperationException
- * if removing from this {@code Collection} is not supported.
- * @throws ClassCastException
- * if one or more elements of {@code collection}
- * isn't of the correct type.
- * @throws NullPointerException
- * if {@code collection} contains at least one
- * {@code null} element and this {@code Collection} doesn't support
- * {@code null} elements.
- * @throws NullPointerException
- * if {@code collection} is {@code null}.
- */
+ /// Removes all objects from this `Collection` that are not also found in the
+ /// `Collection` passed (optional). After this method returns this `Collection`
+ /// will only contain elements that also can be found in the `Collection`
+ /// passed to this method.
+ ///
+ /// #### Parameters
+ ///
+ /// - `collection`: the collection of objects to retain.
+ ///
+ /// #### Returns
+ ///
+ /// @return `true` if this `Collection` is modified, `false`
+ /// otherwise.
+ ///
+ /// #### Throws
+ ///
+ /// - `UnsupportedOperationException`: if removing from this `Collection` is not supported.
+ ///
+ /// - `ClassCastException`: @throws ClassCastException
+ /// if one or more elements of `collection`
+ /// isn't of the correct type.
+ ///
+ /// - `NullPointerException`: @throws NullPointerException
+ /// if `collection` contains at least one
+ /// `null` element and this `Collection` doesn't support
+ /// `null` elements.
+ ///
+ /// - `NullPointerException`: if `collection` is `null`.
public boolean retainAll(Collection> collection);
- /**
- * Returns a count of how many objects this {@code Collection} contains.
- *
- * @return how many objects this {@code Collection} contains, or Integer.MAX_VALUE
- * if there are more than Integer.MAX_VALUE elements in this
- * {@code Collection}.
- */
+ /// Returns a count of how many objects this `Collection` contains.
+ ///
+ /// #### Returns
+ ///
+ /// @return how many objects this `Collection` contains, or Integer.MAX_VALUE
+ /// if there are more than Integer.MAX_VALUE elements in this
+ /// `Collection`.
public int size();
- /**
- * Returns a new array containing all elements contained in this {@code Collection}.
- *
- * If the implementation has ordered elements it will return the element
- * array in the same order as an iterator would return them.
- *
- * The array returned does not reflect any changes of the {@code Collection}. A new
- * array is created even if the underlying data structure is already an
- * array.
- *
- * @return an array of the elements from this {@code Collection}.
- */
+ /// Returns a new array containing all elements contained in this `Collection`.
+ ///
+ /// If the implementation has ordered elements it will return the element
+ /// array in the same order as an iterator would return them.
+ ///
+ /// The array returned does not reflect any changes of the `Collection`. A new
+ /// array is created even if the underlying data structure is already an
+ /// array.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `Collection`.
public Object[] toArray();
- /**
- * Returns an array containing all elements contained in this {@code Collection}. If
- * the specified array is large enough to hold the elements, the specified
- * array is used, otherwise an array of the same type is created. If the
- * specified array is used and is larger than this {@code Collection}, the array
- * element following the {@code Collection} elements is set to null.
- *
- * If the implementation has ordered elements it will return the element
- * array in the same order as an iterator would return them.
- *
- * {@code toArray(new Object[0])} behaves exactly the same way as
- * {@code toArray()} does.
- *
- * @param array
- * the array.
- * @return an array of the elements from this {@code Collection}.
- *
- * @throws ArrayStoreException
- * if the type of an element in this {@code Collection} cannot be
- * stored in the type of the specified array.
- */
+ /// Returns an array containing all elements contained in this `Collection`. If
+ /// the specified array is large enough to hold the elements, the specified
+ /// array is used, otherwise an array of the same type is created. If the
+ /// specified array is used and is larger than this `Collection`, the array
+ /// element following the `Collection` elements is set to null.
+ ///
+ /// If the implementation has ordered elements it will return the element
+ /// array in the same order as an iterator would return them.
+ ///
+ /// `toArray(new Object[0])` behaves exactly the same way as
+ /// `toArray()` does.
+ ///
+ /// #### Parameters
+ ///
+ /// - `array`: the array.
+ ///
+ /// #### Returns
+ ///
+ /// an array of the elements from this `Collection`.
+ ///
+ /// #### Throws
+ ///
+ /// - `ArrayStoreException`: @throws ArrayStoreException
+ /// if the type of an element in this `Collection` cannot be
+ /// stored in the type of the specified array.
public T[] toArray(T[] array);
}
diff --git a/Ports/CLDC11/src/java/util/Collections.java b/Ports/CLDC11/src/java/util/Collections.java
index 4ce54e4262..932ed72909 100644
--- a/Ports/CLDC11/src/java/util/Collections.java
+++ b/Ports/CLDC11/src/java/util/Collections.java
@@ -18,12 +18,12 @@
package java.util;
-/**
- * {@code Collections} contains static methods which operate on
- * {@code Collection} classes.
- *
- * @since 1.2
- */
+/// `Collections` contains static methods which operate on
+/// `Collection` classes.
+///
+/// #### Since
+///
+/// 1.2
public class Collections {
private static final class CopiesList extends AbstractList {
@@ -158,27 +158,19 @@ private Object readResolve() {
}
}
- /**
- * An empty immutable instance of {@link List}.
- */
+ /// An empty immutable instance of `List`.
@SuppressWarnings("unchecked")
public static final List EMPTY_LIST = new EmptyList();
- /**
- * An empty immutable instance of {@link Set}.
- */
+ /// An empty immutable instance of `Set`.
@SuppressWarnings("unchecked")
public static final Set EMPTY_SET = new EmptySet();
- /**
- * An empty immutable instance of {@link Map}.
- */
+ /// An empty immutable instance of `Map`.
@SuppressWarnings("unchecked")
public static final Map EMPTY_MAP = new EmptyMap();
- /**
- * This class is a singleton so that equals() and hashCode() work properly.
- */
+ /// This class is a singleton so that equals() and hashCode() work properly.
private static final class ReverseComparator implements Comparator {
private static final ReverseComparator