->
(entry) operator
The infix entry operator creates an Entry
from its key and value.
Usage
Entry<Integer, String> intName = 1 -> "One";
Description
Definition
The ->
operator is defined as follows:
Entry(lhs, rhs)
See the language specification for more details.
Polymorphism
The ->
operator is not polymorphic.
Type
The result type of the lhs->rhs
operator is Entry<Lhs,Rhs>
where Lhs
is the type of lhs
and Rhs
is the type of rhs
.
See also
- object creation operators in the language specification
- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon