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

com.urbanairship.api.push.model.Position Maven / Gradle / Ivy

There is a newer version: 9.3.0
Show newest version
/*
 * Copyright (c) 2013-2016.  Urban Airship and Contributors
 */

package com.urbanairship.api.push.model;

import com.google.common.base.Optional;

/**
 * Enum for specifying the notification position.
 */
public enum Position {
    TOP("top"),
    BOTTOM("bottom");

    private final String type;

    private Position(String type) {
        this.type = type;
    }

    public static Optional find(String type) {
        for (Position position : values()) {
            if (position.getType().equals(type)) {
                return Optional.of(position);
            }
        }

        return Optional.absent();
    }

    public String getType() {
        return type;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy