neq

open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression): Expression

Returns true if the input values are not equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), get("keyToOtherValue"))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second expression

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>

open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Expression, @NonNull collator: Expression): Expression

Returns true if the input values are not equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), get("keyToOtherValue"), collator(true, false))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second expression

collator

the collator expression

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>

open fun neq(compareOne: Expression, compareTwo: Boolean): Expression

Returns true if the input values are equal, false otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), true)
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second boolean

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>

open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: String): Expression

Returns `true` if the input values are not equal, `false` otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), "value")
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second string

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>

open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: String, @NonNull collator: Expression): Expression

Returns true if the input values are not equal, false otherwise. The inputs must be numbers, strings, or booleans, and both of the same type.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), get("keyToOtherValue"), collator(true, false))
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second String

collator

the collator expression

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>

open fun neq(@NonNull compareOne: Expression, @NonNull compareTwo: Number): Expression

Returns `true` if the input values are not equal, `false` otherwise.

Example usage:


FillLayer fillLayer = new FillLayer("layer-id", "source-id");
fillLayer.setFilter(
    neq(get("keyToValue"), 2.0f)
);

Return

expression

Parameters

compareOne

the first expression

compareTwo

the second number

See also

<a href="https://maplibre.org/maplibre-style-spec/expressions/#!=">Style specification</a>