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

com.urbanairship.api.channel.model.attributes.AttributeAction Maven / Gradle / Ivy

There is a newer version: 9.4.2
Show newest version
package com.urbanairship.api.channel.model.attributes;

import java.util.Optional;

public enum AttributeAction {
    SET("set"),
    REMOVE("remove");

    private final String identifier;

    private AttributeAction(String identifier) {
        this.identifier = identifier;
    }

    public static Optional find(String identifier) {
        for (AttributeAction attributeAction : values()) {
            if (attributeAction.getIdentifier().equals(identifier)) {
                return Optional.of(attributeAction);
            }
        }

        return Optional.empty();
    }

    public String getIdentifier() {
        return identifier;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy