All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vaadin.addons.maplibre.dto.expressions.PropertyEquals Maven / Gradle / Ivy

Go to download

An extension to Vaadin that provides a Java API for MapLibreGL slippy map component with modern vector layer support.

There is a newer version: 1.2.0
Show newest version
package org.vaadin.addons.maplibre.dto.expressions;

import org.vaadin.addons.maplibre.dto.AbstractDto;

import java.util.List;

public class PropertyEquals extends Case {
    public PropertyEquals(String propertyName, Object machedValue, Object result) {
        super(AbstractDto.arr("==", AbstractDto.arr("get", propertyName), machedValue), result);
    }

    public static PropertyEquals[] anyValue(String propertyName, Object result, Object... matchedValues) {
        PropertyEquals[] propertyEquals = new PropertyEquals[matchedValues.length];
        for (int i = 0; i < matchedValues.length; i++) {
            propertyEquals[i] = new PropertyEquals(propertyName, matchedValues[i], result);
        }
        return propertyEquals;
    }

    public static PropertyEquals[] anyValue(String propertyName, Object result, List matchedValues) {
        return matchedValues.stream().map(value -> new PropertyEquals(propertyName, value, result)).toArray(PropertyEquals[]::new);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy