mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 22:34:27 +02:00
Merge
This commit is contained in:
commit
82847e4ec0
812 changed files with 22235 additions and 13150 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, 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
|
||||
|
@ -57,7 +57,7 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
protected int count;
|
||||
|
||||
/**
|
||||
* Creates a new byte array output stream. The buffer capacity is
|
||||
* Creates a new {@code ByteArrayOutputStream}. The buffer capacity is
|
||||
* initially 32 bytes, though its size increases if necessary.
|
||||
*/
|
||||
public ByteArrayOutputStream() {
|
||||
|
@ -65,11 +65,11 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
}
|
||||
|
||||
/**
|
||||
* Creates a new byte array output stream, with a buffer capacity of
|
||||
* Creates a new {@code ByteArrayOutputStream}, with a buffer capacity of
|
||||
* the specified size, in bytes.
|
||||
*
|
||||
* @param size the initial size.
|
||||
* @exception IllegalArgumentException if size is negative.
|
||||
* @param size the initial size.
|
||||
* @throws IllegalArgumentException if size is negative.
|
||||
*/
|
||||
public ByteArrayOutputStream(int size) {
|
||||
if (size < 0) {
|
||||
|
@ -84,7 +84,7 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
* at least the number of elements specified by the minimum
|
||||
* capacity argument.
|
||||
*
|
||||
* @param minCapacity the desired minimum capacity
|
||||
* @param minCapacity the desired minimum capacity
|
||||
* @throws OutOfMemoryError if {@code minCapacity < 0}. This is
|
||||
* interpreted as a request for the unsatisfiably large capacity
|
||||
* {@code (long) Integer.MAX_VALUE + (minCapacity - Integer.MAX_VALUE)}.
|
||||
|
@ -129,7 +129,7 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
}
|
||||
|
||||
/**
|
||||
* Writes the specified byte to this byte array output stream.
|
||||
* Writes the specified byte to this {@code ByteArrayOutputStream}.
|
||||
*
|
||||
* @param b the byte to be written.
|
||||
*/
|
||||
|
@ -141,11 +141,15 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
|
||||
/**
|
||||
* Writes {@code len} bytes from the specified byte array
|
||||
* starting at offset {@code off} to this byte array output stream.
|
||||
* starting at offset {@code off} to this {@code ByteArrayOutputStream}.
|
||||
*
|
||||
* @param b the data.
|
||||
* @param off the start offset in the data.
|
||||
* @param len the number of bytes to write.
|
||||
* @throws NullPointerException if {@code b} is {@code null}.
|
||||
* @throws IndexOutOfBoundsException if {@code off} is negative,
|
||||
* {@code len} is negative, or {@code len} is greater than
|
||||
* {@code b.length - off}
|
||||
*/
|
||||
public synchronized void write(byte b[], int off, int len) {
|
||||
Objects.checkFromIndexSize(off, len, b.length);
|
||||
|
@ -155,20 +159,37 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
}
|
||||
|
||||
/**
|
||||
* Writes the complete contents of this byte array output stream to
|
||||
* Writes the complete contents of the specified byte array
|
||||
* to this {@code ByteArrayOutputStream}.
|
||||
*
|
||||
* @apiNote
|
||||
* This method is equivalent to {@link #write(byte[],int,int)
|
||||
* write(b, 0, b.length)}.
|
||||
*
|
||||
* @param b the data.
|
||||
* @throws NullPointerException if {@code b} is {@code null}.
|
||||
* @since 11
|
||||
*/
|
||||
public void writeBytes(byte b[]) {
|
||||
write(b, 0, b.length);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the complete contents of this {@code ByteArrayOutputStream} to
|
||||
* the specified output stream argument, as if by calling the output
|
||||
* stream's write method using {@code out.write(buf, 0, count)}.
|
||||
*
|
||||
* @param out the output stream to which to write the data.
|
||||
* @exception IOException if an I/O error occurs.
|
||||
* @param out the output stream to which to write the data.
|
||||
* @throws NullPointerException if {@code out} is {@code null}.
|
||||
* @throws IOException if an I/O error occurs.
|
||||
*/
|
||||
public synchronized void writeTo(OutputStream out) throws IOException {
|
||||
out.write(buf, 0, count);
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the {@code count} field of this byte array output
|
||||
* stream to zero, so that all currently accumulated output in the
|
||||
* Resets the {@code count} field of this {@code ByteArrayOutputStream}
|
||||
* 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.
|
||||
*
|
||||
|
@ -244,12 +265,12 @@ public class ByteArrayOutputStream extends OutputStream {
|
|||
* </pre>
|
||||
*
|
||||
*
|
||||
* @param charsetName the name of a supported
|
||||
* {@link java.nio.charset.Charset charset}
|
||||
* @return String decoded from the buffer's contents.
|
||||
* @exception UnsupportedEncodingException
|
||||
* If the named charset is not supported
|
||||
* @since 1.1
|
||||
* @param charsetName the name of a supported
|
||||
* {@link java.nio.charset.Charset charset}
|
||||
* @return String decoded from the buffer's contents.
|
||||
* @throws UnsupportedEncodingException
|
||||
* If the named charset is not supported
|
||||
* @since 1.1
|
||||
*/
|
||||
public synchronized String toString(String charsetName)
|
||||
throws UnsupportedEncodingException
|
||||
|
|
|
@ -38,6 +38,15 @@ import jdk.internal.misc.SharedSecrets;
|
|||
|
||||
/**
|
||||
* Filter classes, array lengths, and graph metrics during deserialization.
|
||||
*
|
||||
* <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
|
||||
* and should be avoided. Untrusted data should be carefully validated according to the
|
||||
* "Serialization and Deserialization" section of the
|
||||
* {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
|
||||
* {@extLink serialization_filter_guide Serialization Filtering} describes best
|
||||
* practices for defensive use of serial filters.
|
||||
* </strong></p>
|
||||
*
|
||||
* If set on an {@link ObjectInputStream}, the {@link #checkInput checkInput(FilterInfo)}
|
||||
* method is called to validate classes, the length of each array,
|
||||
* the number of objects being read from the stream, the depth of the graph,
|
||||
|
|
|
@ -52,6 +52,14 @@ import sun.reflect.misc.ReflectUtil;
|
|||
* An ObjectInputStream deserializes primitive data and objects previously
|
||||
* written using an ObjectOutputStream.
|
||||
*
|
||||
* <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
|
||||
* and should be avoided. Untrusted data should be carefully validated according to the
|
||||
* "Serialization and Deserialization" section of the
|
||||
* {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
|
||||
* {@extLink serialization_filter_guide Serialization Filtering} describes best
|
||||
* practices for defensive use of serial filters.
|
||||
* </strong></p>
|
||||
*
|
||||
* <p>ObjectOutputStream and ObjectInputStream can provide an application with
|
||||
* persistent storage for graphs of objects when used with a FileOutputStream
|
||||
* and FileInputStream respectively. ObjectInputStream is used to recover
|
||||
|
|
|
@ -27,7 +27,17 @@ package java.io;
|
|||
|
||||
/**
|
||||
* Serializability of a class is enabled by the class implementing the
|
||||
* java.io.Serializable interface. Classes that do not implement this
|
||||
* java.io.Serializable interface.
|
||||
*
|
||||
* <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
|
||||
* and should be avoided. Untrusted data should be carefully validated according to the
|
||||
* "Serialization and Deserialization" section of the
|
||||
* {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
|
||||
* {@extLink serialization_filter_guide Serialization Filtering} describes best
|
||||
* practices for defensive use of serial filters.
|
||||
* </strong></p>
|
||||
*
|
||||
* Classes that do not implement this
|
||||
* interface will not have any of their state serialized or
|
||||
* deserialized. All subtypes of a serializable class are themselves
|
||||
* serializable. The serialization interface has no methods or fields
|
||||
|
|
|
@ -31,19 +31,17 @@
|
|||
* method in any class or interface in this package will cause a
|
||||
* {@code NullPointerException} to be thrown.
|
||||
*
|
||||
* <h2>Package Specification</h2>
|
||||
* <h2>Object Serialization</h2>
|
||||
* <p><strong>Warning: Deserialization of untrusted data is inherently dangerous
|
||||
* and should be avoided. Untrusted data should be carefully validated according to the
|
||||
* "Serialization and Deserialization" section of the
|
||||
* {@extLink secure_coding_guidelines_javase Secure Coding Guidelines for Java SE}.
|
||||
* </strong></p>
|
||||
* <ul>
|
||||
* <li><a href="{@docRoot}/../specs/serialization/index.html">
|
||||
* Java Object Serialization Specification </a>
|
||||
* </ul>
|
||||
*
|
||||
* <h2>Related Documentation</h2>
|
||||
*
|
||||
* For overviews, tutorials, examples, guides, and tool documentation,
|
||||
* please see:
|
||||
* <ul>
|
||||
* <li>{@extLink serialver_tool_reference The serialver tool}</li>
|
||||
* <li>{@extLink serialization_guide Serialization Documentation}</li>
|
||||
* <li>{@extLink serialization_filter_guide Serial Filtering} best practices</li>
|
||||
* <li>{@extLink serialver_tool_reference The serialver tool}</li>
|
||||
* </ul>
|
||||
*
|
||||
* @since 1.0
|
||||
|
|
|
@ -129,7 +129,7 @@ public final class Boolean implements java.io.Serializable,
|
|||
* @since 1.5
|
||||
*/
|
||||
public static boolean parseBoolean(String s) {
|
||||
return ((s != null) && s.equalsIgnoreCase("true"));
|
||||
return "true".equalsIgnoreCase(s);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -74,7 +74,7 @@ public interface CharSequence {
|
|||
* indexing.
|
||||
*
|
||||
* <p>If the {@code char} value specified by the index is a
|
||||
* <a href="{@docRoot}/java/lang/Character.html#unicode">surrogate</a>, the surrogate
|
||||
* <a href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate</a>, the surrogate
|
||||
* value is returned.
|
||||
*
|
||||
* @param index the index of the {@code char} value to be returned
|
||||
|
@ -119,7 +119,7 @@ public interface CharSequence {
|
|||
/**
|
||||
* Returns a stream of {@code int} zero-extending the {@code char} values
|
||||
* from this sequence. Any char which maps to a <a
|
||||
* href="{@docRoot}/java/lang/Character.html#unicode">surrogate code
|
||||
* href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code
|
||||
* point</a> is passed through uninterpreted.
|
||||
*
|
||||
* <p>The stream binds to this sequence when the terminal stream operation
|
||||
|
|
|
@ -73,7 +73,7 @@ import sun.security.util.SecurityConstants;
|
|||
/**
|
||||
* A class loader is an object that is responsible for loading classes. The
|
||||
* class {@code ClassLoader} is an abstract class. Given the <a
|
||||
* href="#name">binary name</a> of a class, a class loader should attempt to
|
||||
* href="#binary-name">binary name</a> of a class, a class loader should attempt to
|
||||
* locate or generate data that constitutes a definition for the class. A
|
||||
* typical strategy is to transform the name into a file name and then read a
|
||||
* "class file" of that name from a file system.
|
||||
|
@ -202,7 +202,7 @@ import sun.security.util.SecurityConstants;
|
|||
* }
|
||||
* </pre></blockquote>
|
||||
*
|
||||
* <h3> <a id="name">Binary names</a> </h3>
|
||||
* <h3> <a id="binary-name">Binary names</a> </h3>
|
||||
*
|
||||
* <p> Any class name provided as a {@code String} parameter to methods in
|
||||
* {@code ClassLoader} must be a binary name as defined by
|
||||
|
@ -480,7 +480,7 @@ public abstract class ClassLoader {
|
|||
// -- Class --
|
||||
|
||||
/**
|
||||
* Loads the class with the specified <a href="#name">binary name</a>.
|
||||
* Loads the class with the specified <a href="#binary-name">binary name</a>.
|
||||
* This method searches for classes in the same manner as the {@link
|
||||
* #loadClass(String, boolean)} method. It is invoked by the Java virtual
|
||||
* machine to resolve class references. Invoking this method is equivalent
|
||||
|
@ -488,7 +488,7 @@ public abstract class ClassLoader {
|
|||
* false)}.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The resulting {@code Class} object
|
||||
*
|
||||
|
@ -500,7 +500,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Loads the class with the specified <a href="#name">binary name</a>. The
|
||||
* Loads the class with the specified <a href="#binary-name">binary name</a>. The
|
||||
* default implementation of this method searches for classes in the
|
||||
* following order:
|
||||
*
|
||||
|
@ -530,7 +530,7 @@ public abstract class ClassLoader {
|
|||
* during the entire class loading process.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @param resolve
|
||||
* If {@code true} then resolve the class
|
||||
|
@ -579,7 +579,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Loads the class with the specified <a href="#name">binary name</a>
|
||||
* Loads the class with the specified <a href="#binary-name">binary name</a>
|
||||
* in a module defined to this class loader. This method returns {@code null}
|
||||
* if the class could not be found.
|
||||
*
|
||||
|
@ -598,7 +598,7 @@ public abstract class ClassLoader {
|
|||
* @param module
|
||||
* The module
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The resulting {@code Class} object in a module defined by
|
||||
* this class loader, or {@code null} if the class could not be found.
|
||||
|
@ -674,7 +674,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Finds the class with the specified <a href="#name">binary name</a>.
|
||||
* Finds the class with the specified <a href="#binary-name">binary name</a>.
|
||||
* This method should be overridden by class loader implementations that
|
||||
* follow the delegation model for loading classes, and will be invoked by
|
||||
* the {@link #loadClass loadClass} method after checking the
|
||||
|
@ -683,7 +683,7 @@ public abstract class ClassLoader {
|
|||
* @implSpec The default implementation throws {@code ClassNotFoundException}.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The resulting {@code Class} object
|
||||
*
|
||||
|
@ -697,7 +697,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Finds the class with the given <a href="#name">binary name</a>
|
||||
* Finds the class with the given <a href="#binary-name">binary name</a>
|
||||
* in a module defined to this class loader.
|
||||
* Class loader implementations that support the loading from modules
|
||||
* should override this method.
|
||||
|
@ -715,7 +715,7 @@ public abstract class ClassLoader {
|
|||
* class loader
|
||||
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The resulting {@code Class} object, or {@code null}
|
||||
* if the class could not be found.
|
||||
|
@ -737,7 +737,7 @@ public abstract class ClassLoader {
|
|||
* Converts an array of bytes into an instance of class {@code Class}.
|
||||
* Before the {@code Class} can be used it must be resolved. This method
|
||||
* is deprecated in favor of the version that takes a <a
|
||||
* href="#name">binary name</a> as its first argument, and is more secure.
|
||||
* href="#binary-name">binary name</a> as its first argument, and is more secure.
|
||||
*
|
||||
* @param b
|
||||
* The bytes that make up the class data. The bytes in positions
|
||||
|
@ -804,12 +804,12 @@ public abstract class ClassLoader {
|
|||
* This method defines a package in this class loader corresponding to the
|
||||
* package of the {@code Class} (if such a package has not already been defined
|
||||
* in this class loader). The name of the defined package is derived from
|
||||
* the <a href="#name">binary name</a> of the class specified by
|
||||
* the <a href="#binary-name">binary name</a> of the class specified by
|
||||
* the byte array {@code b}.
|
||||
* Other properties of the defined package are as specified by {@link Package}.
|
||||
*
|
||||
* @param name
|
||||
* The expected <a href="#name">binary name</a> of the class, or
|
||||
* The expected <a href="#binary-name">binary name</a> of the class, or
|
||||
* {@code null} if not known
|
||||
*
|
||||
* @param b
|
||||
|
@ -923,7 +923,7 @@ public abstract class ClassLoader {
|
|||
* package must contain the same set of certificates or a
|
||||
* {@code SecurityException} will be thrown. Note that if
|
||||
* {@code name} is {@code null}, this check is not performed.
|
||||
* You should always pass in the <a href="#name">binary name</a> of the
|
||||
* You should always pass in the <a href="#binary-name">binary name</a> of the
|
||||
* class you are defining as well as the bytes. This ensures that the
|
||||
* class you are defining is indeed the class you think it is.
|
||||
*
|
||||
|
@ -931,19 +931,19 @@ public abstract class ClassLoader {
|
|||
* only be defined by the {@linkplain #getPlatformClassLoader()
|
||||
* platform class loader} or its ancestors; otherwise {@code SecurityException}
|
||||
* will be thrown. If {@code name} is not {@code null}, it must be equal to
|
||||
* the <a href="#name">binary name</a> of the class
|
||||
* the <a href="#binary-name">binary name</a> of the class
|
||||
* specified by the byte array {@code b}, otherwise a {@link
|
||||
* NoClassDefFoundError NoClassDefFoundError} will be thrown.
|
||||
*
|
||||
* <p> This method defines a package in this class loader corresponding to the
|
||||
* package of the {@code Class} (if such a package has not already been defined
|
||||
* in this class loader). The name of the defined package is derived from
|
||||
* the <a href="#name">binary name</a> of the class specified by
|
||||
* the <a href="#binary-name">binary name</a> of the class specified by
|
||||
* the byte array {@code b}.
|
||||
* Other properties of the defined package are as specified by {@link Package}.
|
||||
*
|
||||
* @param name
|
||||
* The expected <a href="#name">binary name</a> of the class, or
|
||||
* The expected <a href="#binary-name">binary name</a> of the class, or
|
||||
* {@code null} if not known
|
||||
*
|
||||
* @param b
|
||||
|
@ -969,7 +969,7 @@ public abstract class ClassLoader {
|
|||
*
|
||||
* @throws NoClassDefFoundError
|
||||
* If {@code name} is not {@code null} and not equal to the
|
||||
* <a href="#name">binary name</a> of the class specified by {@code b}
|
||||
* <a href="#binary-name">binary name</a> of the class specified by {@code b}
|
||||
*
|
||||
* @throws IndexOutOfBoundsException
|
||||
* If either {@code off} or {@code len} is negative, or if
|
||||
|
@ -1027,7 +1027,7 @@ public abstract class ClassLoader {
|
|||
* </code></p>
|
||||
*
|
||||
* @param name
|
||||
* The expected <a href="#name">binary name</a>. of the class, or
|
||||
* The expected <a href="#binary-name">binary name</a>. of the class, or
|
||||
* {@code null} if not known
|
||||
*
|
||||
* @param b
|
||||
|
@ -1047,7 +1047,7 @@ public abstract class ClassLoader {
|
|||
*
|
||||
* @throws NoClassDefFoundError
|
||||
* If {@code name} is not {@code null} and not equal to the
|
||||
* <a href="#name">binary name</a> of the class specified by {@code b}
|
||||
* <a href="#binary-name">binary name</a> of the class specified by {@code b}
|
||||
*
|
||||
* @throws SecurityException
|
||||
* If an attempt is made to add this class to a package that
|
||||
|
@ -1198,7 +1198,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Finds a class with the specified <a href="#name">binary name</a>,
|
||||
* Finds a class with the specified <a href="#binary-name">binary name</a>,
|
||||
* loading it if necessary.
|
||||
*
|
||||
* <p> This method loads the class through the system class loader (see
|
||||
|
@ -1209,7 +1209,7 @@ public abstract class ClassLoader {
|
|||
* #findClass(String)}. </p>
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The {@code Class} object for the specified {@code name}
|
||||
*
|
||||
|
@ -1239,13 +1239,13 @@ public abstract class ClassLoader {
|
|||
private native Class<?> findBootstrapClass(String name);
|
||||
|
||||
/**
|
||||
* Returns the class with the given <a href="#name">binary name</a> if this
|
||||
* Returns the class with the given <a href="#binary-name">binary name</a> if this
|
||||
* loader has been recorded by the Java virtual machine as an initiating
|
||||
* loader of a class with that <a href="#name">binary name</a>. Otherwise
|
||||
* loader of a class with that <a href="#binary-name">binary name</a>. Otherwise
|
||||
* {@code null} is returned.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">binary name</a> of the class
|
||||
* The <a href="#binary-name">binary name</a> of the class
|
||||
*
|
||||
* @return The {@code Class} object, or {@code null} if the class has
|
||||
* not been loaded
|
||||
|
@ -2087,9 +2087,9 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Defines a package by <a href="#name">name</a> in this {@code ClassLoader}.
|
||||
* Defines a package by <a href="#binary-name">name</a> in this {@code ClassLoader}.
|
||||
* <p>
|
||||
* <a href="#name">Package names</a> must be unique within a class loader and
|
||||
* <a href="#binary-name">Package names</a> must be unique within a class loader and
|
||||
* cannot be redefined or changed once created.
|
||||
* <p>
|
||||
* If a class loader wishes to define a package with specific properties,
|
||||
|
@ -2123,7 +2123,7 @@ public abstract class ClassLoader {
|
|||
* in a named module may be for example sealed with different seal base.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">package name</a>
|
||||
* The <a href="#binary-name">package name</a>
|
||||
*
|
||||
* @param specTitle
|
||||
* The specification title
|
||||
|
@ -2185,10 +2185,10 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Returns a {@code Package} of the given <a href="#name">name</a> that
|
||||
* Returns a {@code Package} of the given <a href="#binary-name">name</a> that
|
||||
* has been defined by this class loader.
|
||||
*
|
||||
* @param name The <a href="#name">package name</a>
|
||||
* @param name The <a href="#binary-name">package name</a>
|
||||
*
|
||||
* @return The {@code Package} of the given name that has been defined
|
||||
* by this class loader, or {@code null} if not found
|
||||
|
@ -2233,7 +2233,7 @@ public abstract class ClassLoader {
|
|||
}
|
||||
|
||||
/**
|
||||
* Finds a package by <a href="#name">name</a> in this class loader and its ancestors.
|
||||
* Finds a package by <a href="#binary-name">name</a> in this class loader and its ancestors.
|
||||
* <p>
|
||||
* If this class loader defines a {@code Package} of the given name,
|
||||
* the {@code Package} is returned. Otherwise, the ancestors of
|
||||
|
@ -2247,7 +2247,7 @@ public abstract class ClassLoader {
|
|||
* class loader.
|
||||
*
|
||||
* @param name
|
||||
* The <a href="#name">package name</a>
|
||||
* The <a href="#binary-name">package name</a>
|
||||
*
|
||||
* @return The {@code Package} of the given name that has been defined by
|
||||
* this class loader or its ancestors, or {@code null} if not found.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -84,7 +84,7 @@ import java.util.*;
|
|||
* {(x, y) such that x.equals(y)}. </pre><p>
|
||||
*
|
||||
* This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <T> the type of objects that this object may be compared to
|
||||
|
|
|
@ -1574,13 +1574,7 @@ public final class Integer extends Number implements Comparable<Integer> {
|
|||
* @since 1.5
|
||||
*/
|
||||
public static int highestOneBit(int i) {
|
||||
// HD, Figure 3-1
|
||||
i |= (i >> 1);
|
||||
i |= (i >> 2);
|
||||
i |= (i >> 4);
|
||||
i |= (i >> 8);
|
||||
i |= (i >> 16);
|
||||
return i - (i >>> 1);
|
||||
return i & (MIN_VALUE >>> numberOfLeadingZeros(i));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1719,14 +1719,7 @@ public final class Long extends Number implements Comparable<Long> {
|
|||
* @since 1.5
|
||||
*/
|
||||
public static long highestOneBit(long i) {
|
||||
// HD, Figure 3-1
|
||||
i |= (i >> 1);
|
||||
i |= (i >> 2);
|
||||
i |= (i >> 4);
|
||||
i |= (i >> 8);
|
||||
i |= (i >> 16);
|
||||
i |= (i >> 32);
|
||||
return i - (i >>> 1);
|
||||
return i & (MIN_VALUE >>> numberOfLeadingZeros(i));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2018, 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
|
||||
|
@ -80,7 +80,7 @@ import java.util.stream.Stream;
|
|||
*
|
||||
* <p>
|
||||
* The {@code ProcessHandle} static factory methods return instances that are
|
||||
* <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>,
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>,
|
||||
* immutable and thread-safe.
|
||||
* Use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on these instances of
|
||||
|
|
|
@ -1140,7 +1140,7 @@ public class Runtime {
|
|||
* number is not the major-release number but the feature-release
|
||||
* counter, incremented for every time-based release. Use the {@link
|
||||
* #feature()} method in preference to this method. For compatibility,
|
||||
* this method returns the value of the <a href="FEATURE">feature</a>
|
||||
* this method returns the value of the <a href="#FEATURE">feature</a>
|
||||
* element.
|
||||
*
|
||||
* @return The value of the feature element
|
||||
|
@ -1158,7 +1158,7 @@ public class Runtime {
|
|||
* number is not the minor-release number but the interim-release
|
||||
* counter, incremented for every interim release. Use the {@link
|
||||
* #interim()} method in preference to this method. For compatibility,
|
||||
* this method returns the value of the <a href="INTERIM">interim</a>
|
||||
* this method returns the value of the <a href="#INTERIM">interim</a>
|
||||
* element, or zero if it is absent.
|
||||
*
|
||||
* @return The value of the interim element, or zero
|
||||
|
@ -1176,7 +1176,7 @@ public class Runtime {
|
|||
* number is not the security level but the update-release counter,
|
||||
* incremented for every update release. Use the {@link #update()}
|
||||
* method in preference to this method. For compatibility, this method
|
||||
* returns the value of the <a href="UPDATE">update</a> element, or
|
||||
* returns the value of the <a href="#UPDATE">update</a> element, or
|
||||
* zero if it is absent.
|
||||
*
|
||||
* @return The value of the update element, or zero
|
||||
|
@ -1188,9 +1188,9 @@ public class Runtime {
|
|||
|
||||
/**
|
||||
* Returns an unmodifiable {@link java.util.List List} of the integers
|
||||
* represented in the <a href="#verNum">version number</a>. The {@code
|
||||
* List} always contains at least one element corresponding to the <a
|
||||
* href="#feature">feature version number</a>.
|
||||
* represented in the <a href="#verNum">version number</a>.
|
||||
* The {@code List} always contains at least one element corresponding to
|
||||
* the <a href="#FEATURE">feature version number</a>.
|
||||
*
|
||||
* @return An unmodifiable list of the integers
|
||||
* represented in the version number
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1995, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1995, 2018, 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
|
||||
|
@ -235,19 +235,6 @@ public class SecurityManager {
|
|||
*/
|
||||
private boolean initialized = false;
|
||||
|
||||
|
||||
/**
|
||||
* returns true if the current context has been granted AllPermission
|
||||
*/
|
||||
private boolean hasAllPermission() {
|
||||
try {
|
||||
checkPermission(SecurityConstants.ALL_PERMISSION);
|
||||
return true;
|
||||
} catch (SecurityException se) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs a new <code>SecurityManager</code>.
|
||||
*
|
||||
|
@ -1080,28 +1067,6 @@ public class SecurityManager {
|
|||
SecurityConstants.PROPERTY_READ_ACTION));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns {@code true} if the calling thread has {@code AllPermission}.
|
||||
*
|
||||
* @param window not used except to check if it is {@code null}.
|
||||
* @return {@code true} if the calling thread has {@code AllPermission}.
|
||||
* @exception NullPointerException if the {@code window} argument is
|
||||
* {@code null}.
|
||||
* @deprecated This method was originally used to check if the calling thread
|
||||
* was trusted to bring up a top-level window. The method has been
|
||||
* obsoleted and code should instead use {@link #checkPermission}
|
||||
* to check {@code AWTPermission("showWindowWithoutWarningBanner")}.
|
||||
* This method is subject to removal in a future version of Java SE.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
@Deprecated(since="1.8", forRemoval=true)
|
||||
public boolean checkTopLevelWindow(Object window) {
|
||||
if (window == null) {
|
||||
throw new NullPointerException("window can't be null");
|
||||
}
|
||||
return hasAllPermission();
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a <code>SecurityException</code> if the
|
||||
* calling thread is not allowed to initiate a print job request.
|
||||
|
@ -1124,44 +1089,6 @@ public class SecurityManager {
|
|||
checkPermission(new RuntimePermission("queuePrintJob"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws {@code SecurityException} if the calling thread does
|
||||
* not have {@code AllPermission}.
|
||||
*
|
||||
* @since 1.1
|
||||
* @exception SecurityException if the calling thread does not have
|
||||
* {@code AllPermission}
|
||||
* @deprecated This method was originally used to check if the calling
|
||||
* thread could access the system clipboard. The method has been
|
||||
* obsoleted and code should instead use {@link #checkPermission}
|
||||
* to check {@code AWTPermission("accessClipboard")}.
|
||||
* This method is subject to removal in a future version of Java SE.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
@Deprecated(since="1.8", forRemoval=true)
|
||||
public void checkSystemClipboardAccess() {
|
||||
checkPermission(SecurityConstants.ALL_PERMISSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws {@code SecurityException} if the calling thread does
|
||||
* not have {@code AllPermission}.
|
||||
*
|
||||
* @since 1.1
|
||||
* @exception SecurityException if the calling thread does not have
|
||||
* {@code AllPermission}
|
||||
* @deprecated This method was originally used to check if the calling
|
||||
* thread could access the AWT event queue. The method has been
|
||||
* obsoleted and code should instead use {@link #checkPermission}
|
||||
* to check {@code AWTPermission("accessEventQueue")}.
|
||||
* This method is subject to removal in a future version of Java SE.
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
@Deprecated(since="1.8", forRemoval=true)
|
||||
public void checkAwtEventQueueAccess() {
|
||||
checkPermission(SecurityConstants.ALL_PERMISSION);
|
||||
}
|
||||
|
||||
/*
|
||||
* We have an initial invalid bit (initially false) for the class
|
||||
* variables which tell if the cache is valid. If the underlying
|
||||
|
@ -1474,35 +1401,6 @@ public class SecurityManager {
|
|||
checkPermission(new RuntimePermission("setFactory"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Throws a {@code SecurityException} if the calling thread does
|
||||
* not have {@code AllPermission}.
|
||||
*
|
||||
* @param clazz the class that reflection is to be performed on.
|
||||
* @param which type of access, PUBLIC or DECLARED.
|
||||
* @throws SecurityException if the caller does not have
|
||||
* {@code AllPermission}
|
||||
* @throws NullPointerException if the {@code clazz} argument is
|
||||
* {@code null}
|
||||
* @deprecated This method was originally used to check if the calling
|
||||
* thread was allowed to access members. It relied on the
|
||||
* caller being at a stack depth of 4 which is error-prone and
|
||||
* cannot be enforced by the runtime. The method has been
|
||||
* obsoleted and code should instead use
|
||||
* {@link #checkPermission} to check
|
||||
* {@code RuntimePermission("accessDeclaredMembers")}. This
|
||||
* method is subject to removal in a future version of Java SE.
|
||||
* @since 1.1
|
||||
* @see #checkPermission(java.security.Permission) checkPermission
|
||||
*/
|
||||
@Deprecated(since="1.8", forRemoval=true)
|
||||
public void checkMemberAccess(Class<?> clazz, int which) {
|
||||
if (clazz == null) {
|
||||
throw new NullPointerException("class can't be null");
|
||||
}
|
||||
checkPermission(SecurityConstants.ALL_PERMISSION);
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines whether the permission with the specified permission target
|
||||
* name should be granted or denied.
|
||||
|
|
|
@ -2647,7 +2647,7 @@ public final class String
|
|||
/**
|
||||
* Returns a stream of {@code int} zero-extending the {@code char} values
|
||||
* from this sequence. Any char which maps to a <a
|
||||
* href="{@docRoot}/java/lang/Character.html#unicode">surrogate code
|
||||
* href="{@docRoot}/java.base/java/lang/Character.html#unicode">surrogate code
|
||||
* point</a> is passed through uninterpreted.
|
||||
*
|
||||
* @return an IntStream of char values from this sequence
|
||||
|
|
|
@ -52,6 +52,9 @@ import static java.lang.Character.highSurrogate;
|
|||
import static java.lang.Character.lowSurrogate;
|
||||
import static java.lang.Character.isSupplementaryCodePoint;
|
||||
import static java.lang.StringUTF16.putChar;
|
||||
import static java.nio.charset.StandardCharsets.ISO_8859_1;
|
||||
import static java.nio.charset.StandardCharsets.US_ASCII;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
/**
|
||||
* Utility class for string encoding and decoding.
|
||||
|
@ -67,10 +70,6 @@ class StringCoding {
|
|||
private static final ThreadLocal<SoftReference<StringEncoder>> encoder =
|
||||
new ThreadLocal<>();
|
||||
|
||||
private static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
|
||||
private static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
|
||||
private static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
|
||||
|
||||
private static <T> T deref(ThreadLocal<SoftReference<T>> tl) {
|
||||
SoftReference<T> sr = tl.get();
|
||||
if (sr == null)
|
||||
|
|
|
@ -146,15 +146,14 @@ class Thread implements Runnable {
|
|||
}
|
||||
|
||||
private volatile String name;
|
||||
private int priority;
|
||||
private Thread threadQ;
|
||||
private long eetop;
|
||||
private int priority;
|
||||
|
||||
/* Whether or not the thread is a daemon thread. */
|
||||
private boolean daemon = false;
|
||||
private boolean daemon = false;
|
||||
|
||||
/* JVM state */
|
||||
private boolean stillborn = false;
|
||||
/* Fields reserved for exclusive use by the JVM */
|
||||
private boolean stillborn = false;
|
||||
private long eetop;
|
||||
|
||||
/* What will be run. */
|
||||
private Runnable target;
|
||||
|
@ -189,7 +188,7 @@ class Thread implements Runnable {
|
|||
* not specify a stack size. It is up to the VM to do whatever it
|
||||
* likes with this number; some VMs will ignore it.
|
||||
*/
|
||||
private long stackSize;
|
||||
private final long stackSize;
|
||||
|
||||
/*
|
||||
* JVM-private state that persists after native thread termination.
|
||||
|
@ -199,20 +198,20 @@ class Thread implements Runnable {
|
|||
/*
|
||||
* Thread ID
|
||||
*/
|
||||
private long tid;
|
||||
private final long tid;
|
||||
|
||||
/* For generating thread ID */
|
||||
private static long threadSeqNumber;
|
||||
|
||||
private static synchronized long nextThreadID() {
|
||||
return ++threadSeqNumber;
|
||||
}
|
||||
|
||||
/*
|
||||
* Java thread status for tools, default indicates thread 'not yet started'
|
||||
*/
|
||||
private volatile int threadStatus;
|
||||
|
||||
private static synchronized long nextThreadID() {
|
||||
return ++threadSeqNumber;
|
||||
}
|
||||
|
||||
/**
|
||||
* The argument supplied to the current call to
|
||||
* java.util.concurrent.locks.LockSupport.park.
|
||||
|
@ -377,15 +376,6 @@ class Thread implements Runnable {
|
|||
@HotSpotIntrinsicCandidate
|
||||
public static void onSpinWait() {}
|
||||
|
||||
/**
|
||||
* Initializes a Thread with the current AccessControlContext.
|
||||
* @see #init(ThreadGroup,Runnable,String,long,AccessControlContext,boolean)
|
||||
*/
|
||||
private void init(ThreadGroup g, Runnable target, String name,
|
||||
long stackSize) {
|
||||
init(g, target, name, stackSize, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Initializes a Thread.
|
||||
*
|
||||
|
@ -399,9 +389,9 @@ class Thread implements Runnable {
|
|||
* @param inheritThreadLocals if {@code true}, inherit initial values for
|
||||
* inheritable thread-locals from the constructing thread
|
||||
*/
|
||||
private void init(ThreadGroup g, Runnable target, String name,
|
||||
long stackSize, AccessControlContext acc,
|
||||
boolean inheritThreadLocals) {
|
||||
private Thread(ThreadGroup g, Runnable target, String name,
|
||||
long stackSize, AccessControlContext acc,
|
||||
boolean inheritThreadLocals) {
|
||||
if (name == null) {
|
||||
throw new NullPointerException("name cannot be null");
|
||||
}
|
||||
|
@ -419,8 +409,8 @@ class Thread implements Runnable {
|
|||
g = security.getThreadGroup();
|
||||
}
|
||||
|
||||
/* If the security doesn't have a strong opinion of the matter
|
||||
use the parent thread group. */
|
||||
/* If the security manager doesn't have a strong opinion
|
||||
on the matter, use the parent thread group. */
|
||||
if (g == null) {
|
||||
g = parent.getThreadGroup();
|
||||
}
|
||||
|
@ -459,7 +449,7 @@ class Thread implements Runnable {
|
|||
this.stackSize = stackSize;
|
||||
|
||||
/* Set thread ID */
|
||||
tid = nextThreadID();
|
||||
this.tid = nextThreadID();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -482,7 +472,7 @@ class Thread implements Runnable {
|
|||
* {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
|
||||
*/
|
||||
public Thread() {
|
||||
init(null, null, "Thread-" + nextThreadNum(), 0);
|
||||
this(null, null, "Thread-" + nextThreadNum(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -498,7 +488,7 @@ class Thread implements Runnable {
|
|||
* nothing.
|
||||
*/
|
||||
public Thread(Runnable target) {
|
||||
init(null, target, "Thread-" + nextThreadNum(), 0);
|
||||
this(null, target, "Thread-" + nextThreadNum(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -507,7 +497,7 @@ class Thread implements Runnable {
|
|||
* This is not a public constructor.
|
||||
*/
|
||||
Thread(Runnable target, AccessControlContext acc) {
|
||||
init(null, target, "Thread-" + nextThreadNum(), 0, acc, false);
|
||||
this(null, target, "Thread-" + nextThreadNum(), 0, acc, false);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -534,7 +524,7 @@ class Thread implements Runnable {
|
|||
* thread group
|
||||
*/
|
||||
public Thread(ThreadGroup group, Runnable target) {
|
||||
init(group, target, "Thread-" + nextThreadNum(), 0);
|
||||
this(group, target, "Thread-" + nextThreadNum(), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -546,7 +536,7 @@ class Thread implements Runnable {
|
|||
* the name of the new thread
|
||||
*/
|
||||
public Thread(String name) {
|
||||
init(null, null, name, 0);
|
||||
this(null, null, name, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -570,7 +560,7 @@ class Thread implements Runnable {
|
|||
* thread group
|
||||
*/
|
||||
public Thread(ThreadGroup group, String name) {
|
||||
init(group, null, name, 0);
|
||||
this(group, null, name, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -586,7 +576,7 @@ class Thread implements Runnable {
|
|||
* the name of the new thread
|
||||
*/
|
||||
public Thread(Runnable target, String name) {
|
||||
init(null, target, name, 0);
|
||||
this(null, target, name, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -634,7 +624,7 @@ class Thread implements Runnable {
|
|||
* thread group or cannot override the context class loader methods.
|
||||
*/
|
||||
public Thread(ThreadGroup group, Runnable target, String name) {
|
||||
init(group, target, name, 0);
|
||||
this(group, target, name, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -713,7 +703,7 @@ class Thread implements Runnable {
|
|||
*/
|
||||
public Thread(ThreadGroup group, Runnable target, String name,
|
||||
long stackSize) {
|
||||
init(group, target, name, stackSize);
|
||||
this(group, target, name, stackSize, null, true);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -769,7 +759,7 @@ class Thread implements Runnable {
|
|||
*/
|
||||
public Thread(ThreadGroup group, Runnable target, String name,
|
||||
long stackSize, boolean inheritThreadLocals) {
|
||||
init(group, target, name, stackSize, null, inheritThreadLocals);
|
||||
this(group, target, name, stackSize, null, inheritThreadLocals);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -924,7 +914,7 @@ class Thread implements Runnable {
|
|||
* for example), the {@code interrupt} method should be used to
|
||||
* interrupt the wait.
|
||||
* For more information, see
|
||||
* <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
|
||||
*/
|
||||
@Deprecated(since="1.2")
|
||||
|
@ -957,7 +947,7 @@ class Thread implements Runnable {
|
|||
* could be used to generate exceptions that the target thread was
|
||||
* not prepared to handle.
|
||||
* For more information, see
|
||||
* <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
|
||||
* This method is subject to removal in a future version of Java SE.
|
||||
*/
|
||||
|
@ -1083,7 +1073,7 @@ class Thread implements Runnable {
|
|||
* If another thread ever attempted to lock this resource, deadlock
|
||||
* would result. Such deadlocks typically manifest themselves as
|
||||
* "frozen" processes. For more information, see
|
||||
* <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">
|
||||
* Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
|
||||
* This method is subject to removal in a future version of Java SE.
|
||||
* @throws NoSuchMethodError always
|
||||
|
@ -1123,7 +1113,7 @@ class Thread implements Runnable {
|
|||
* monitor prior to calling {@code resume}, deadlock results. Such
|
||||
* deadlocks typically manifest themselves as "frozen" processes.
|
||||
* For more information, see
|
||||
* <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
|
||||
*/
|
||||
@Deprecated(since="1.2")
|
||||
|
@ -1149,7 +1139,7 @@ class Thread implements Runnable {
|
|||
* @deprecated This method exists solely for use with {@link #suspend},
|
||||
* which has been deprecated because it is deadlock-prone.
|
||||
* For more information, see
|
||||
* <a href="{@docRoot}/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* <a href="{@docRoot}/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html">Why
|
||||
* are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
|
||||
*/
|
||||
@Deprecated(since="1.2")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -29,7 +29,7 @@ package java.lang;
|
|||
* Thrown to indicate that the requested operation is not supported.<p>
|
||||
*
|
||||
* This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -2035,11 +2035,26 @@ return mh1;
|
|||
ReflectiveOperationException.class);
|
||||
}
|
||||
|
||||
MemberName resolveOrNull(byte refKind, MemberName member) {
|
||||
// do this before attempting to resolve
|
||||
if (!isClassAccessible(member.getDeclaringClass())) {
|
||||
return null;
|
||||
}
|
||||
Objects.requireNonNull(member.getName());
|
||||
Objects.requireNonNull(member.getType());
|
||||
return IMPL_NAMES.resolveOrNull(refKind, member, lookupClassOrNull());
|
||||
}
|
||||
|
||||
void checkSymbolicClass(Class<?> refc) throws IllegalAccessException {
|
||||
if (!isClassAccessible(refc)) {
|
||||
throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
|
||||
}
|
||||
}
|
||||
|
||||
boolean isClassAccessible(Class<?> refc) {
|
||||
Objects.requireNonNull(refc);
|
||||
Class<?> caller = lookupClassOrNull();
|
||||
if (caller != null && !VerifyAccess.isClassAccessible(refc, caller, allowedModes))
|
||||
throw new MemberName(refc).makeAccessException("symbolic reference class is not accessible", this);
|
||||
return caller == null || VerifyAccess.isClassAccessible(refc, caller, allowedModes);
|
||||
}
|
||||
|
||||
/** Check name for an illegal leading "<" character. */
|
||||
|
@ -2482,10 +2497,13 @@ return mh1;
|
|||
}
|
||||
}
|
||||
try {
|
||||
MemberName resolved2 = publicLookup().resolveOrFail(refKind,
|
||||
MemberName resolved2 = publicLookup().resolveOrNull(refKind,
|
||||
new MemberName(refKind, defc, member.getName(), member.getType()));
|
||||
if (resolved2 == null) {
|
||||
return false;
|
||||
}
|
||||
checkSecurityManager(defc, resolved2);
|
||||
} catch (ReflectiveOperationException | SecurityException ex) {
|
||||
} catch (SecurityException ex) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2014, 2018, 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
|
||||
|
@ -48,7 +48,7 @@ import jdk.internal.module.ModuleTarget;
|
|||
/**
|
||||
* A configuration that is the result of <a href="package-summary.html#resolution">
|
||||
* resolution</a> or resolution with
|
||||
* <a href="{@docRoot}/java/lang/module/Configuration.html#service-binding">service binding</a>.
|
||||
* <a href="{@docRoot}/java.base/java/lang/module/Configuration.html#service-binding">service binding</a>.
|
||||
*
|
||||
* <p> A configuration encapsulates the <em>readability graph</em> that is the
|
||||
* output of resolution. A readability graph is a directed graph whose vertices
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -58,7 +58,7 @@
|
|||
* represent errors and exceptions.
|
||||
*
|
||||
* <a id="charenc"></a>
|
||||
* <h3>Character Encodings</h3>
|
||||
* <h2>Character Encodings</h2>
|
||||
*
|
||||
* The specification of the {@link java.nio.charset.Charset
|
||||
* java.nio.charset.Charset} class describes the naming conventions
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
package java.nio.charset;
|
||||
|
||||
import jdk.internal.misc.VM;
|
||||
import sun.nio.cs.StandardCharsets;
|
||||
import sun.nio.cs.ThreadLocalCoders;
|
||||
import sun.security.action.GetPropertyAction;
|
||||
|
||||
|
@ -311,7 +310,8 @@ public abstract class Charset
|
|||
}
|
||||
|
||||
/* The standard set of charsets */
|
||||
private static final CharsetProvider standardProvider = new StandardCharsets();
|
||||
private static final CharsetProvider standardProvider
|
||||
= new sun.nio.cs.StandardCharsets();
|
||||
|
||||
private static final String[] zeroAliases = new String[0];
|
||||
|
||||
|
@ -609,7 +609,7 @@ public abstract class Charset
|
|||
if (cs != null)
|
||||
defaultCharset = cs;
|
||||
else
|
||||
defaultCharset = sun.nio.cs.UTF_8.INSTANCE;
|
||||
defaultCharset = StandardCharsets.UTF_8;
|
||||
}
|
||||
}
|
||||
return defaultCharset;
|
||||
|
|
|
@ -41,26 +41,26 @@ public final class StandardCharsets {
|
|||
* Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the
|
||||
* Unicode character set
|
||||
*/
|
||||
public static final Charset US_ASCII = sun.nio.cs.US_ASCII.INSTANCE;
|
||||
public static final Charset US_ASCII = new sun.nio.cs.US_ASCII();
|
||||
/**
|
||||
* ISO Latin Alphabet No. 1, a.k.a. ISO-LATIN-1
|
||||
*/
|
||||
public static final Charset ISO_8859_1 = sun.nio.cs.ISO_8859_1.INSTANCE;
|
||||
public static final Charset ISO_8859_1 = new sun.nio.cs.ISO_8859_1();
|
||||
/**
|
||||
* Eight-bit UCS Transformation Format
|
||||
*/
|
||||
public static final Charset UTF_8 = sun.nio.cs.UTF_8.INSTANCE;
|
||||
public static final Charset UTF_8 = new sun.nio.cs.UTF_8();
|
||||
/**
|
||||
* Sixteen-bit UCS Transformation Format, big-endian byte order
|
||||
*/
|
||||
public static final Charset UTF_16BE = Charset.forName("UTF-16BE");
|
||||
public static final Charset UTF_16BE = new sun.nio.cs.UTF_16BE();
|
||||
/**
|
||||
* Sixteen-bit UCS Transformation Format, little-endian byte order
|
||||
*/
|
||||
public static final Charset UTF_16LE = Charset.forName("UTF-16LE");
|
||||
public static final Charset UTF_16LE = new sun.nio.cs.UTF_16LE();
|
||||
/**
|
||||
* Sixteen-bit UCS Transformation Format, byte order identified by an
|
||||
* optional byte-order mark
|
||||
*/
|
||||
public static final Charset UTF_16 = Charset.forName("UTF-16");
|
||||
public static final Charset UTF_16 = new sun.nio.cs.UTF_16();
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2007, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2018, 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
|
||||
|
@ -33,7 +33,7 @@
|
|||
* package is used by service provider implementors wishing to extend the
|
||||
* platform default provider, or to construct other provider implementations. </p>
|
||||
*
|
||||
* <h3><a id="links">Symbolic Links</a></h3>
|
||||
* <h2><a id="links">Symbolic Links</a></h2>
|
||||
* <p> Many operating systems and file systems support for <em>symbolic links</em>.
|
||||
* A symbolic link is a special file that serves as a reference to another file.
|
||||
* For the most part, symbolic links are transparent to applications and
|
||||
|
@ -45,7 +45,7 @@
|
|||
* that are semantically close but support for these other types of links is
|
||||
* not included in this package. </p>
|
||||
*
|
||||
* <h3><a id="interop">Interoperability</a></h3>
|
||||
* <h2><a id="interop">Interoperability</a></h2>
|
||||
* <p> The {@link java.io.File} class defines the {@link java.io.File#toPath
|
||||
* toPath} method to construct a {@link java.nio.file.Path} by converting
|
||||
* the abstract path represented by the {@code java.io.File} object. The resulting
|
||||
|
@ -54,7 +54,7 @@
|
|||
* on the <a href="Path.html#interop">interoperability</a> between {@code Path}
|
||||
* and {@code java.io.File} objects. </p>
|
||||
*
|
||||
* <h3>Visibility</h3>
|
||||
* <h2>Visibility</h2>
|
||||
* <p> The view of the files and file system provided by classes in this package are
|
||||
* guaranteed to be consistent with other views provided by other instances in the
|
||||
* same Java virtual machine. The view may or may not, however, be consistent with
|
||||
|
@ -65,7 +65,7 @@
|
|||
* or on some other machine. The exact nature of any such inconsistencies are
|
||||
* system-dependent and are therefore unspecified. </p>
|
||||
*
|
||||
* <h3><a id="integrity">Synchronized I/O File Integrity</a></h3>
|
||||
* <h2><a id="integrity">Synchronized I/O File Integrity</a></h2>
|
||||
* <p> The {@link java.nio.file.StandardOpenOption#SYNC SYNC} and {@link
|
||||
* java.nio.file.StandardOpenOption#DSYNC DSYNC} options are used when opening a file
|
||||
* to require that updates to the file are written synchronously to the underlying
|
||||
|
@ -82,7 +82,7 @@
|
|||
* java.nio.file.spi.FileSystemProvider provider} implementations is provider
|
||||
* specific. </p>
|
||||
*
|
||||
* <h3>General Exceptions</h3>
|
||||
* <h2>General Exceptions</h2>
|
||||
* <p> Unless otherwise noted, passing a {@code null} argument to a constructor
|
||||
* or method of any class or interface in this package will cause a {@link
|
||||
* java.lang.NullPointerException NullPointerException} to be thrown. Additionally,
|
||||
|
@ -103,7 +103,7 @@
|
|||
* provider} with a parameter that is an object created by another provider,
|
||||
* will throw {@link java.nio.file.ProviderMismatchException}. </p>
|
||||
*
|
||||
* <h3>Optional Specific Exceptions</h3>
|
||||
* <h2>Optional Specific Exceptions</h2>
|
||||
* Most of the methods defined by classes in this package that access the
|
||||
* file system specify that {@link java.io.IOException} be thrown when an I/O
|
||||
* error occurs. In some cases, these methods define specific I/O exceptions
|
||||
|
|
|
@ -212,7 +212,7 @@ public class ChoiceFormat extends NumberFormat {
|
|||
} else if (tempBuffer.equals("-\u221E")) {
|
||||
startValue = Double.NEGATIVE_INFINITY;
|
||||
} else {
|
||||
startValue = Double.valueOf(tempBuffer);
|
||||
startValue = Double.parseDouble(tempBuffer);
|
||||
}
|
||||
|
||||
if (ch == '<' && startValue != Double.POSITIVE_INFINITY &&
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -119,7 +119,7 @@ import java.util.regex.Pattern;
|
|||
* See {@link Instant} for a discussion as to the meaning of the second and time-scales.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code Duration} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -193,7 +193,7 @@ import java.util.Objects;
|
|||
* {@code ZonedDateTime} and {@code Duration}.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code Instant} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -125,7 +125,7 @@ import java.util.stream.Stream;
|
|||
* to be accurate will find the ISO-8601 approach unsuitable.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code LocalDate} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -121,7 +121,7 @@ import java.util.Objects;
|
|||
* to be accurate will find the ISO-8601 approach unsuitable.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code LocalDateTime} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -111,7 +111,7 @@ import java.util.Objects;
|
|||
* representation, this class, for time-of-day.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code LocalTime} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -113,7 +113,7 @@ import java.util.Objects;
|
|||
* to be accurate will find the ISO-8601 approach unsuitable.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code MonthDay} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -114,7 +114,7 @@ import java.util.Objects;
|
|||
* more detail, or when communicating to a database or in a network protocol.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code OffsetDateTime} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -104,7 +104,7 @@ import java.util.Objects;
|
|||
* in an {@code OffsetTime}.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code OffsetTime} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -119,7 +119,7 @@ import java.util.regex.Pattern;
|
|||
* period may be negative.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code Period} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -121,7 +121,7 @@ import java.util.Objects;
|
|||
* to be accurate will find the ISO-8601 approach unsuitable.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code Year} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -117,7 +117,7 @@ import java.util.Objects;
|
|||
* to be accurate will find the ISO-8601 approach unsuitable.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code YearMonth} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -162,7 +162,7 @@ import static java.util.Map.entry;
|
|||
* queried, but not modified, on a Java Runtime with incomplete time-zone information.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code ZoneId} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -116,7 +116,7 @@ import java.util.concurrent.ConcurrentMap;
|
|||
* applications must not rely on such caching.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code ZoneOffset} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -144,7 +144,7 @@ import java.util.Objects;
|
|||
* represents an instant, especially during a daylight savings overlap.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code ZonedDateTime} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -105,7 +105,7 @@ import java.time.temporal.ValueRange;
|
|||
* to a new HijrahChronology.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code HijrahDate} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -112,7 +112,7 @@ import sun.util.calendar.LocalGregorianCalendar;
|
|||
* {@code JapaneseChronology.ERA_HEISEI}.<br>
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code JapaneseDate} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -92,7 +92,7 @@ import java.util.Objects;
|
|||
* Dates are aligned such that {@code 0001-01-01 (Minguo)} is {@code 1912-01-01 (ISO)}.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code MinguoDate} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -92,7 +92,7 @@ import java.util.Objects;
|
|||
* Dates are aligned such that {@code 2484-01-01 (Buddhist)} is {@code 1941-01-01 (ISO)}.
|
||||
*
|
||||
* <p>
|
||||
* This is a <a href="{@docRoot}/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* This is a <a href="{@docRoot}/java.base/java/lang/doc-files/ValueBased.html">value-based</a>
|
||||
* class; use of identity-sensitive operations (including reference equality
|
||||
* ({@code ==}), identity hash code, or synchronization) on instances of
|
||||
* {@code ThaiBuddhistDate} may have unpredictable results and should be avoided.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -95,7 +95,7 @@
|
|||
* <li>{@link java.time.chrono.ThaiBuddhistChronology Thai Buddhist calendar}</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h3>Example</h3>
|
||||
* <h2>Example</h2>
|
||||
* <p>
|
||||
* This example lists todays date for all of the available calendars.
|
||||
* </p>
|
||||
|
@ -155,7 +155,7 @@
|
|||
* first, last);
|
||||
* </pre>
|
||||
*
|
||||
* <h3>Package specification</h3>
|
||||
* <h2>Package specification</h2>
|
||||
* <p>
|
||||
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
|
||||
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -79,7 +79,7 @@
|
|||
* {@link java.time.format.DecimalStyle DecimalStyle}.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Package specification</h3>
|
||||
* <h2>Package specification</h2>
|
||||
* <p>
|
||||
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
|
||||
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -90,7 +90,7 @@
|
|||
* The calendar neutral API should be reserved for interactions with users.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Dates and Times</h3>
|
||||
* <h2>Dates and Times</h2>
|
||||
* <p>
|
||||
* {@link java.time.Instant} is essentially a numeric timestamp.
|
||||
* The current Instant can be retrieved from a {@link java.time.Clock}.
|
||||
|
@ -118,7 +118,7 @@
|
|||
* The widespread use of time-zones tends to add considerable complexity to an application.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Duration and Period</h3>
|
||||
* <h2>Duration and Period</h2>
|
||||
* <p>
|
||||
* Beyond dates and times, the API also allows the storage of periods and durations of time.
|
||||
* A {@link java.time.Duration} is a simple measure of time along the time-line in nanoseconds.
|
||||
|
@ -126,7 +126,7 @@
|
|||
* to humans, such as years or days.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Additional value types</h3>
|
||||
* <h2>Additional value types</h2>
|
||||
* <p>
|
||||
* {@link java.time.Month} stores a month on its own.
|
||||
* This stores a single month-of-year in isolation, such as 'DECEMBER'.
|
||||
|
@ -160,7 +160,7 @@
|
|||
* but contains less information than a full time-zone.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Package specification</h3>
|
||||
* <h2>Package specification</h2>
|
||||
* <p>
|
||||
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
|
||||
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
@ -172,7 +172,7 @@
|
|||
* or a {@link java.time.DateTimeException}.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Design notes (non normative)</h3>
|
||||
* <h2>Design notes (non normative)</h2>
|
||||
* <p>
|
||||
* The API has been designed to reject null early and to be clear about this behavior.
|
||||
* A key exception is any method that takes an object and returns a boolean, for the purpose
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -75,7 +75,7 @@
|
|||
* <li>Different definitions of weeks</li>
|
||||
* </ul>
|
||||
*
|
||||
* <h3>Fields and Units</h3>
|
||||
* <h2>Fields and Units</h2>
|
||||
* <p>
|
||||
* Dates and times are expressed in terms of fields and units.
|
||||
* A unit is used to measure an amount of time, such as years, days or minutes.
|
||||
|
@ -106,7 +106,7 @@
|
|||
* The fields also provide access to the range of valid values.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Adjustment and Query</h3>
|
||||
* <h2>Adjustment and Query</h2>
|
||||
* <p>
|
||||
* A key part of the date-time problem space is adjusting a date to a new, related value,
|
||||
* such as the "last day of the month", or "next Wednesday".
|
||||
|
@ -131,7 +131,7 @@
|
|||
* Applications can also define queries by implementing {@link java.time.temporal.TemporalQuery}.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Weeks</h3>
|
||||
* <h2>Weeks</h2>
|
||||
* <p>
|
||||
* Different locales have different definitions of the week.
|
||||
* For example, in Europe the week typically starts on a Monday, while in the US it starts on a Sunday.
|
||||
|
@ -143,7 +143,7 @@
|
|||
* This is modeled in {@link java.time.temporal.IsoFields}.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Package specification</h3>
|
||||
* <h2>Package specification</h2>
|
||||
* <p>
|
||||
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
|
||||
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2012, 2018, 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
|
||||
|
@ -70,7 +70,7 @@
|
|||
* gaps and overlaps in the local time-line typically caused by Daylight Saving Time.
|
||||
* </p>
|
||||
*
|
||||
* <h3>Package specification</h3>
|
||||
* <h2>Package specification</h2>
|
||||
* <p>
|
||||
* Unless otherwise noted, passing a null argument to a constructor or method in any class or interface
|
||||
* in this package will cause a {@link java.lang.NullPointerException NullPointerException} to be thrown.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -49,7 +49,7 @@ package java.util;
|
|||
* the collection being implemented admits a more efficient implementation.<p>
|
||||
*
|
||||
* This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -62,7 +62,7 @@ import java.util.function.Consumer;
|
|||
* collection being implemented admits a more efficient implementation.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -52,7 +52,7 @@ import java.util.Map.Entry;
|
|||
* map being implemented admits a more efficient implementation.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
|
|
@ -54,7 +54,7 @@ package java.util;
|
|||
* instead subclassing {@link AbstractCollection}.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -54,7 +54,7 @@ package java.util;
|
|||
* specification.<p>
|
||||
*
|
||||
* This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -42,7 +42,7 @@ package java.util;
|
|||
* for {@code equals} and {@code hashCode}.<p>
|
||||
*
|
||||
* This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -80,7 +80,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* Iterator} interfaces.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch and Doug Lea
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -92,7 +92,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements in this list
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -63,7 +63,7 @@ import java.util.stream.StreamSupport;
|
|||
* a MergeSort, but it does have to be <i>stable</i>.)
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -188,7 +188,7 @@ import java.util.stream.StreamSupport;
|
|||
* unmodifiable view, the view can be considered effectively immutable.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @implSpec
|
||||
|
@ -247,10 +247,10 @@ public interface Collection<E> extends Iterable<E> {
|
|||
* element
|
||||
* @throws ClassCastException if the type of the specified element
|
||||
* is incompatible with this collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean contains(Object o);
|
||||
|
||||
|
@ -379,10 +379,10 @@ public interface Collection<E> extends Iterable<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the type of the specified element
|
||||
* is incompatible with this collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws UnsupportedOperationException if the {@code remove} operation
|
||||
* is not supported by this collection
|
||||
*/
|
||||
|
@ -401,11 +401,11 @@ public interface Collection<E> extends Iterable<E> {
|
|||
* @throws ClassCastException if the types of one or more elements
|
||||
* in the specified collection are incompatible with this
|
||||
* collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified collection contains one
|
||||
* or more null elements and this collection does not permit null
|
||||
* elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null.
|
||||
* @see #contains(Object)
|
||||
*/
|
||||
|
@ -451,11 +451,11 @@ public interface Collection<E> extends Iterable<E> {
|
|||
* @throws ClassCastException if the types of one or more elements
|
||||
* in this collection are incompatible with the specified
|
||||
* collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this collection contains one or more
|
||||
* null elements and the specified collection does not support
|
||||
* null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
* @see #contains(Object)
|
||||
|
@ -510,11 +510,11 @@ public interface Collection<E> extends Iterable<E> {
|
|||
* @throws ClassCastException if the types of one or more elements
|
||||
* in this collection are incompatible with the specified
|
||||
* collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this collection contains one or more
|
||||
* null elements and the specified collection does not permit null
|
||||
* elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
* @see #contains(Object)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -66,7 +66,7 @@ import java.util.stream.StreamSupport;
|
|||
* already sorted may or may not throw {@code UnsupportedOperationException}.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -94,7 +94,7 @@ import java.util.Comparators;
|
|||
* an equivalence relation.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <T> the type of objects that may be compared by this comparator
|
||||
|
|
|
@ -193,7 +193,7 @@ package java.util;
|
|||
* {@code Object}.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
@ -363,10 +363,10 @@ public interface Deque<E> extends Queue<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* deque does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean removeFirstOccurrence(Object o);
|
||||
|
||||
|
@ -382,10 +382,10 @@ public interface Deque<E> extends Queue<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* deque does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean removeLastOccurrence(Object o);
|
||||
|
||||
|
@ -565,10 +565,10 @@ public interface Deque<E> extends Queue<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* deque does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean remove(Object o);
|
||||
|
||||
|
@ -581,10 +581,10 @@ public interface Deque<E> extends Queue<E> {
|
|||
* @return {@code true} if this deque contains the specified element
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null and this
|
||||
* deque does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean contains(Object o);
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, 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
|
||||
|
@ -68,7 +68,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* {@link HashMap} counterparts.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, 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
|
||||
|
@ -69,7 +69,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* constant time if their argument is also an enum set.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -118,7 +118,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -73,7 +73,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, 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
|
||||
|
@ -107,7 +107,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
*
|
||||
* <p>As of the Java 2 platform v1.2, this class was retrofitted to
|
||||
* implement the {@link Map} interface, making it a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
*
|
||||
* Java Collections Framework</a>. Unlike the new collection
|
||||
* implementations, {@code Hashtable} is synchronized. If a
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, 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
|
||||
|
@ -123,7 +123,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* {@link HashMap} (which uses <i>chaining</i> rather than linear-probing).
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @see System#identityHashCode(Object)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -40,7 +40,7 @@ import java.util.function.Consumer;
|
|||
* </ul>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @apiNote
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -140,7 +140,7 @@ import java.io.IOException;
|
|||
* <em>fail-fast</em>, and additionally report {@link Spliterator#ORDERED}.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @implNote
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, 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
|
||||
|
@ -100,7 +100,7 @@ package java.util;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -70,7 +70,7 @@ import java.util.function.Consumer;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -115,7 +115,7 @@ import java.util.function.UnaryOperator;
|
|||
* </ul>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements in this list
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -46,7 +46,7 @@ package java.util;
|
|||
* {@link #previous()}.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Josh Bloch
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -141,7 +141,7 @@ import java.io.Serializable;
|
|||
* </ul>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
@ -187,10 +187,10 @@ public interface Map<K, V> {
|
|||
* key
|
||||
* @throws ClassCastException if the key is of an inappropriate type for
|
||||
* this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key is null and this map
|
||||
* does not permit null keys
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean containsKey(Object key);
|
||||
|
||||
|
@ -207,10 +207,10 @@ public interface Map<K, V> {
|
|||
* specified value
|
||||
* @throws ClassCastException if the value is of an inappropriate type for
|
||||
* this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified value is null and this
|
||||
* map does not permit null values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean containsValue(Object value);
|
||||
|
||||
|
@ -235,10 +235,10 @@ public interface Map<K, V> {
|
|||
* {@code null} if this map contains no mapping for the key
|
||||
* @throws ClassCastException if the key is of an inappropriate type for
|
||||
* this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key is null and this map
|
||||
* does not permit null keys
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
V get(Object key);
|
||||
|
||||
|
@ -295,10 +295,10 @@ public interface Map<K, V> {
|
|||
* is not supported by this map
|
||||
* @throws ClassCastException if the key is of an inappropriate type for
|
||||
* this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key is null and this
|
||||
* map does not permit null keys
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
V remove(Object key);
|
||||
|
||||
|
@ -608,10 +608,10 @@ public interface Map<K, V> {
|
|||
* {@code defaultValue} if this map contains no mapping for the key
|
||||
* @throws ClassCastException if the key is of an inappropriate type for
|
||||
* this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key is null and this map
|
||||
* does not permit null keys
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default V getOrDefault(Object key, V defaultValue) {
|
||||
|
@ -690,13 +690,13 @@ public interface Map<K, V> {
|
|||
* values
|
||||
* @throws ClassCastException if a replacement value is of an inappropriate
|
||||
* type for this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if function or a replacement value is null,
|
||||
* and this map does not permit null keys or values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of a replacement value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ConcurrentModificationException if an entry is found to be
|
||||
* removed during iteration
|
||||
* @since 1.8
|
||||
|
@ -757,16 +757,16 @@ public interface Map<K, V> {
|
|||
* if the implementation supports null values.)
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the key or value is of an inappropriate
|
||||
* type for this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key or value is null,
|
||||
* and this map does not permit null keys or values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default V putIfAbsent(K key, V value) {
|
||||
|
@ -803,13 +803,13 @@ public interface Map<K, V> {
|
|||
* @return {@code true} if the value was removed
|
||||
* @throws UnsupportedOperationException if the {@code remove} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the key or value is of an inappropriate
|
||||
* type for this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key or value is null,
|
||||
* and this map does not permit null keys or values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default boolean remove(Object key, Object value) {
|
||||
|
@ -852,14 +852,14 @@ public interface Map<K, V> {
|
|||
* @return {@code true} if the value was replaced
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of a specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* @throws NullPointerException if a specified key or newValue is null,
|
||||
* and this map does not permit null keys or values
|
||||
* @throws NullPointerException if oldValue is null and this map does not
|
||||
* permit null values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of a specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* @since 1.8
|
||||
|
@ -902,10 +902,10 @@ public interface Map<K, V> {
|
|||
* if the implementation supports null values.)
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of the specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key or value is null,
|
||||
* and this map does not permit null keys or values
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
|
@ -985,13 +985,13 @@ public interface Map<K, V> {
|
|||
* is null
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of the specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default V computeIfAbsent(K key,
|
||||
|
@ -1062,13 +1062,13 @@ public interface Map<K, V> {
|
|||
* remappingFunction is null
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of the specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default V computeIfPresent(K key,
|
||||
|
@ -1154,13 +1154,13 @@ public interface Map<K, V> {
|
|||
* remappingFunction is null
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of the specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @since 1.8
|
||||
*/
|
||||
default V compute(K key,
|
||||
|
@ -1249,13 +1249,13 @@ public interface Map<K, V> {
|
|||
* value is associated with the key
|
||||
* @throws UnsupportedOperationException if the {@code put} operation
|
||||
* is not supported by this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws ClassCastException if the class of the specified key or value
|
||||
* prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws IllegalArgumentException if some property of the specified key
|
||||
* or value prevents it from being stored in this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key is null and this map
|
||||
* does not support null keys or the value or remappingFunction is
|
||||
* null
|
||||
|
|
|
@ -85,7 +85,7 @@ package java.util;
|
|||
* {@link #keySet()} can be overridden to return {@link NavigableSet}.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
|
|
@ -79,7 +79,7 @@ package java.util;
|
|||
* {@code NavigableSet}.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2003, 2018, 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
|
||||
|
@ -74,7 +74,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* ({@code peek}, {@code element}, and {@code size}).
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -128,7 +128,7 @@ package java.util;
|
|||
* ordering properties.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2000, 2006, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2000, 2018, 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
|
||||
|
@ -59,7 +59,7 @@ package java.util;
|
|||
* </pre>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.4
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2018, 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
|
||||
|
@ -251,7 +251,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
|
|||
* or "{@code java.properties}" format are searched.
|
||||
*
|
||||
* <p>If the caller module is a
|
||||
* <a href="{@docRoot}/java/util/spi/ResourceBundleProvider.html#obtain-resource-bundle">
|
||||
* <a href="{@docRoot}/java.base/java/util/spi/ResourceBundleProvider.html#obtain-resource-bundle">
|
||||
* resource bundle provider</a>, it does not fall back to the
|
||||
* class loader search.
|
||||
*
|
||||
|
@ -260,7 +260,7 @@ import static sun.security.util.SecurityConstants.GET_CLASSLOADER_PERMISSION;
|
|||
* A common format of resource bundles is in {@linkplain PropertyResourceBundle
|
||||
* .properties} file format. Typically {@code .properties} resource bundles
|
||||
* are packaged in a JAR file. Resource bundle only JAR file can be readily
|
||||
* deployed as an <a href="{@docRoot}/java/lang/module/ModuleFinder.html#automatic-modules">
|
||||
* deployed as an <a href="{@docRoot}/java.base/java/lang/module/ModuleFinder.html#automatic-modules">
|
||||
* automatic module</a>. For example, if the JAR file contains the
|
||||
* entry "{@code p/q/Foo_ja.properties}" and no {@code .class} entry,
|
||||
* when resolved and defined as an automatic module, no package is derived
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -92,7 +92,7 @@ package java.util;
|
|||
* </ul>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -93,7 +93,7 @@ package java.util;
|
|||
* SortedMap<String, V> sub = m.subMap(low+"\0", high);</pre>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -89,7 +89,7 @@ package java.util;
|
|||
* SortedSet<String> sub = s.subSet(low+"\0", high);</pre>
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2018, 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
|
||||
|
@ -92,7 +92,7 @@ import java.util.function.Consumer;
|
|||
* associated map using {@code put}.)
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -74,7 +74,7 @@ package java.util;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <E> the type of elements maintained by this set
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1994, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1994, 2018, 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
|
||||
|
@ -70,7 +70,7 @@ import java.util.function.UnaryOperator;
|
|||
*
|
||||
* <p>As of the Java 2 platform v1.2, this class was retrofitted to
|
||||
* implement the {@link List} interface, making it a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>. Unlike the new collection
|
||||
* implementations, {@code Vector} is synchronized. If a thread-safe
|
||||
* implementation is not needed, it is recommended to use {@link
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1998, 2018, 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
|
||||
|
@ -120,7 +120,7 @@ import java.util.function.Consumer;
|
|||
* should be used only to detect bugs.</i>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @param <K> the type of keys maintained by this map
|
||||
|
|
|
@ -76,7 +76,7 @@ import java.util.function.Predicate;
|
|||
* methods of the {@link Collection} and {@link Iterator} interfaces.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -188,7 +188,7 @@ import java.util.NoSuchElementException;
|
|||
* the {@code BlockingDeque} in another thread.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.6
|
||||
|
@ -399,9 +399,9 @@ public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean removeFirstOccurrence(Object o);
|
||||
|
||||
|
@ -417,9 +417,9 @@ public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
|
|||
* @return {@code true} if an element was removed as a result of this call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean removeLastOccurrence(Object o);
|
||||
|
||||
|
@ -594,9 +594,9 @@ public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
|
|||
* @return {@code true} if this deque changed as a result of the call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean remove(Object o);
|
||||
|
||||
|
@ -609,9 +609,9 @@ public interface BlockingDeque<E> extends BlockingQueue<E>, Deque<E> {
|
|||
* @return {@code true} if this deque contains the specified element
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this deque
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean contains(Object o);
|
||||
|
||||
|
|
|
@ -169,7 +169,7 @@ import java.util.Queue;
|
|||
* the {@code BlockingQueue} in another thread.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
@ -302,9 +302,9 @@ public interface BlockingQueue<E> extends Queue<E> {
|
|||
* @return {@code true} if this queue changed as a result of the call
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this queue
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean remove(Object o);
|
||||
|
||||
|
@ -317,9 +317,9 @@ public interface BlockingQueue<E> extends Queue<E> {
|
|||
* @return {@code true} if this queue contains the specified element
|
||||
* @throws ClassCastException if the class of the specified element
|
||||
* is incompatible with this queue
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified element is null
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean contains(Object o);
|
||||
|
||||
|
|
|
@ -253,7 +253,7 @@ import jdk.internal.misc.Unsafe;
|
|||
* <p>All arguments to all task methods must be non-null.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -85,7 +85,7 @@ import java.util.function.Predicate;
|
|||
* the {@code ConcurrentLinkedDeque} in another thread.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.7
|
||||
|
|
|
@ -99,7 +99,7 @@ import java.util.function.Predicate;
|
|||
* the {@code ConcurrentLinkedQueue} in another thread.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
|
@ -60,7 +60,7 @@ import java.util.function.Function;
|
|||
* the {@code ConcurrentMap} in another thread.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
@ -180,10 +180,10 @@ public interface ConcurrentMap<K,V> extends Map<K,V> {
|
|||
* is not supported by this map
|
||||
* @throws ClassCastException if the key or value is of an inappropriate
|
||||
* type for this map
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified key or value is null,
|
||||
* and this map does not permit null keys or values
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
*/
|
||||
boolean remove(Object key, Object value);
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ import java.util.NavigableSet;
|
|||
* and recursively so for its navigable sub-maps.
|
||||
*
|
||||
* <p>This interface is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
|
|
@ -101,7 +101,7 @@ import java.util.concurrent.atomic.LongAdder;
|
|||
* elements.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
|
|
@ -85,7 +85,7 @@ import java.util.Spliterator;
|
|||
* distinguished from the absence of elements.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @author Doug Lea
|
||||
|
@ -324,7 +324,7 @@ public class ConcurrentSkipListSet<E>
|
|||
* @return {@code true} if this set changed as a result of the call
|
||||
* @throws ClassCastException if the class of an element of this set
|
||||
* is incompatible with the specified collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if the specified collection or any
|
||||
* of its elements are null
|
||||
*/
|
||||
|
|
|
@ -83,7 +83,7 @@ import jdk.internal.misc.SharedSecrets;
|
|||
* the {@code CopyOnWriteArrayList} in another thread.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
@ -645,10 +645,10 @@ public class CopyOnWriteArrayList<E>
|
|||
* @return {@code true} if this list changed as a result of the call
|
||||
* @throws ClassCastException if the class of an element of this list
|
||||
* is incompatible with the specified collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this list contains a null element and the
|
||||
* specified collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
*/
|
||||
|
@ -666,10 +666,10 @@ public class CopyOnWriteArrayList<E>
|
|||
* @return {@code true} if this list changed as a result of the call
|
||||
* @throws ClassCastException if the class of an element of this list
|
||||
* is incompatible with the specified collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this list contains a null element and the
|
||||
* specified collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
*/
|
||||
|
|
|
@ -87,7 +87,7 @@ import java.util.function.Predicate;
|
|||
* }}</pre>
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @see CopyOnWriteArrayList
|
||||
|
@ -340,10 +340,10 @@ public class CopyOnWriteArraySet<E> extends AbstractSet<E>
|
|||
* @return {@code true} if this set changed as a result of the call
|
||||
* @throws ClassCastException if the class of an element of this set
|
||||
* is incompatible with the specified collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this set contains a null element and the
|
||||
* specified collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
*/
|
||||
|
@ -363,10 +363,10 @@ public class CopyOnWriteArraySet<E> extends AbstractSet<E>
|
|||
* @return {@code true} if this set changed as a result of the call
|
||||
* @throws ClassCastException if the class of an element of this set
|
||||
* is incompatible with the specified collection
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>)
|
||||
* @throws NullPointerException if this set contains a null element and the
|
||||
* specified collection does not permit null elements
|
||||
* (<a href="{@docRoot}/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* (<a href="{@docRoot}/java.base/java/util/Collection.html#optional-restrictions">optional</a>),
|
||||
* or if the specified collection is null
|
||||
* @see #remove(Object)
|
||||
*/
|
||||
|
|
|
@ -67,7 +67,7 @@ import java.util.concurrent.locks.ReentrantLock;
|
|||
* particular order.
|
||||
*
|
||||
* <p>This class is a member of the
|
||||
* <a href="{@docRoot}/java/util/package-summary.html#CollectionsFramework">
|
||||
* <a href="{@docRoot}/java.base/java/util/package-summary.html#CollectionsFramework">
|
||||
* Java Collections Framework</a>.
|
||||
*
|
||||
* @since 1.5
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue