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

xyz.thepathfinder.android.TransportStatus Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package xyz.thepathfinder.android;

/**
 * An enum for the possible statuses of a {@link Transport}.
 *
 * @author David Robinson
 */
public enum TransportStatus {

    /**
     * The transport is currently inactive and not accepting routes.
     */
    OFFLINE("Offline"),

    /**
     * The transport is currently active and accepting routes.
     */
    ONLINE("Online");

    /**
     * The string representation of the status.
     */
    private final String status;

    /**
     * A constructor to make each possible status.
     *
     * @param status the string associated with the status.
     */
    private TransportStatus(String status) {
        this.status = status;
    }

    /**
     * Checks if this status is the same as the provided status.
     *
     * @param status a string of status
     * @return true if the status are the same, false otherwise.
     */
    public boolean equals(String status) {
        return this.status.equals(status);
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return this.status;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy