Note: information on this page refers to Ceylon 1.2, not to the current release.
==
(equal) operator
The non-associating, binary infix ==
operator is used to test whether its operands
are equal.
Usage
void m(Object x, Object y) {
Boolean identical = x == y;
}
Description
Definition
The ==
operator is defined as follows:
lhs.equals(rhs);
See the language specification for more details.
Polymorphism
The ==
operator is polymorphic.
The meaning of ==
depends on the
Object
class.
Type
The result type of the ==
operator is Boolean
.
Meaning of identical for built-in types
TODO
See also
-
===
(identical) operator - API documentation for [
Object
]https://modules.ceylon-lang.org/repo/1/ceylon/language/1.2.2/module-doc/Object.type.html) - equality in the language specification
- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon