VectorOperators.Associative
, VectorOperators.Binary
, VectorOperators.Comparison
, VectorOperators.Conversion<E,F>
, VectorOperators.Ternary
, VectorOperators.Test
, VectorOperators.Unary
VectorOperators
public static interface VectorOperators.Operator
Modifier and Type | Method | Description |
---|---|---|
int |
arity() |
Returns the arity of this operator (1, 2, or 3). |
boolean |
compatibleWith |
Reports whether this operator is compatible with the proposed element type. |
boolean |
isAssociative() |
Returns the associativity of this operator. |
boolean |
isBoolean() |
Reports whether this operator returns a boolean (a mask). |
String |
name() |
Returns the symbolic name of this operator, as a constant in VectorOperators . |
String |
operatorName() |
Returns the Java operator symbol or method name corresponding to this operator. |
Class |
rangeType() |
Reports the special return type of this operator. |
String name()
VectorOperators
. The operator symbol, Java method name, or example expression, such as "+"
, "max"
or "-a"
, is also available as operatorName()
."ADD"
String operatorName()
a
, b
(for non-unary operators), and c
(for ternary operators). The symbolic name of the constant, such as "ADD"
, is also available as name()
."+"
, or a method name, such as "max"
, or a representative expression, such as "-a"
int arity()
boolean isBoolean()
boolean
as the rangeType
.Class<?> rangeType()
boolean.class
. If this operator is a Conversion
, returns its range type. Otherwise, the operator's return value always has whatever type was given as an input, and this method returns Object.class
to denote that fact.Object.class
if noneboolean isAssociative()
boolean compatibleWith(Class<?> elementType)
double
or float
and the operator is restricted to floating point types, it is compatible. Otherwise, if the element type is neither double
nor float
and the operator is restricted to integral types, it is compatible. Otherwise, the operator is not compatible.elementType
- the proposed operand type for the operator
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/jdk.incubator.vector/jdk/incubator/vector/VectorOperators.Operator.html