Note: information on this page refers to Ceylon 1.0, not to the current release.
in (containment) operator
The non-associating, binary infix in operator is used to test whether its left-hand
operand is contained in its right-hand operand
Usage
void m(Object x, Category y) {
Boolean contained = x in y;
}
Description
Definition
The in operator is defined as follows:
lhs.contained(rhs);
See the language specification for more details.
Polymorphism
The in operator is polymorphic.
The meaning of in depends on the
Category interface
Type
The result type of the in operator is Boolean.
See also
- API documentation for
Category inin the language specification- operator precedence in the language specification
- Operator polymorphism in the Tour of Ceylon