-
Class Summary
Class |
Description |
Doubles |
A place for static default implementations of the new Java 8
static methods in the Double class.
|
Integers |
A place for static default implementations of the new Java 8
static methods in the Integer class.
|
Iterables |
A place for static default implementations of the new Java 8
default interface methods and static interface methods in the
Iterable interface (and also for removeIf
from Collection ).
|
Longs |
A place for static default implementations of the new Java 8
static methods in the Long class.
|
-
Annotation Types Summary
Annotation Type |
Description |
FunctionalInterface |
An informative annotation type used to indicate that an interface
type declaration is intended to be a functional interface as
defined by the Java Language Specification.
|
Package java8.lang Description
Provides classes for some of the new static methods that were added in Java 8.
Some classes, such as java8.util.Optional
, are value-based. Instances
of a value-based class:
- are final and immutable (though may contain references to mutable objects);
- have implementations of equals, hashCode, and toString which are computed
solely from the instance's state and not from its identity or the state of
any other object or variable;
- make no use of identity-sensitive operations such as reference equality
(==) between instances, identity hash code of instances, or synchronization
on an instances's intrinsic lock;
- are considered equal solely based on equals(), not based on reference
equality (==);
- do not have accessible constructors, but are instead instantiated through
factory methods which make no committment as to the identity of returned
instances;
- are freely substitutable when equal, meaning that interchanging any two
instances x and y that are equal according to equals() in any computation or
method invocation should produce no visible change in behavior.
A program may produce unpredictable results if it attempts to distinguish two
references to equal values of a value-based class, whether directly via
reference equality or indirectly via an appeal to synchronization, identity
hashing, serialization, or any other identity-sensitive mechanism. Use of such
identity-sensitive operations on instances of value-based classes may have
unpredictable effects and should be avoided.
- Since:
- 1.8