//# 0 errors, 121 messages
//#
/*
    //#UpdateStatus.java:1:1: class: com.dmdirc.updater.UpdateStatus
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.updater;

/**
 * Represents the status of an update.
 */
public enum UpdateStatus {
    //#UpdateStatus.java:28: method: UpdateStatus[] com.dmdirc.updater.UpdateStatus.values()
    //#input(UpdateStatus[] values()): $VALUES
    //#input(UpdateStatus[] values()): $VALUES.length
    //#input(UpdateStatus[] values()): $VALUES[0..6]
    //#output(UpdateStatus[] values()): new UpdateStatus[](values#1) num objects
    //#output(UpdateStatus[] values()): return_value.length
    //#output(UpdateStatus[] values()): return_value[0..6]
    //#output(UpdateStatus[] values()): return_value
    //#new obj(UpdateStatus[] values()): new UpdateStatus[](values#1)
    //#pre[1] (UpdateStatus[] values()): (soft) init'ed($VALUES[0..6])
    //#post(UpdateStatus[] values()): return_value == &new UpdateStatus[](values#1)
    //#post(UpdateStatus[] values()): new UpdateStatus[](values#1) num objects == 1
    //#post(UpdateStatus[] values()): return_value.length == 6
    //#post(UpdateStatus[] values()): return_value[0..6] == One-of{$VALUES[0..6], undefined}
    //#UpdateStatus.java:28: end of method: UpdateStatus[] com.dmdirc.updater.UpdateStatus.values()
    //#UpdateStatus.java:28: method: UpdateStatus com.dmdirc.updater.UpdateStatus.valueOf(String)
    //#input(UpdateStatus valueOf(String)): __Descendant_Table[com/dmdirc/updater/UpdateStatus]
    //#input(UpdateStatus valueOf(String)): __Descendant_Table[others]
    //#input(UpdateStatus valueOf(String)): name
    //#output(UpdateStatus valueOf(String)): return_value
    //#presumption(UpdateStatus valueOf(String)): java.lang.Enum:valueOf(...).__Tag@28 == com/dmdirc/updater/UpdateStatus
    //#post(UpdateStatus valueOf(String)): init'ed(return_value)
    //#UpdateStatus.java:28: end of method: UpdateStatus com.dmdirc.updater.UpdateStatus.valueOf(String)

    /** Update pending. */
    PENDING("Pending"), 
    //#UpdateStatus.java:31: method: com.dmdirc.updater.UpdateStatus.com.dmdirc.updater.UpdateStatus__static_init
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES
    //#output(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING
    //#output(com.dmdirc.updater.UpdateStatus__static_init): ERROR
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING
    //#output(com.dmdirc.updater.UpdateStatus__static_init): PENDING
    //#output(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED
    //#output(com.dmdirc.updater.UpdateStatus__static_init): __Descendant_Table[com/dmdirc/updater/UpdateStatus]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#1) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): PENDING.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): PENDING.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#2) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#3) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#4) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#5) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): ERROR.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): ERROR.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#6) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED.__Tag
    //#output(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED.friendlyName
    //#output(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus[](UpdateStatus__static_init#7) num objects
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES.length
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[0]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[1]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[2]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[3]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[4]
    //#output(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[5]
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#1)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#2)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#3)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#4)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#5)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#6)
    //#new obj(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus[](UpdateStatus__static_init#7)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES == &new UpdateStatus[](UpdateStatus__static_init#7)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING == &new UpdateStatus(UpdateStatus__static_init#2)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[1] == &new UpdateStatus(UpdateStatus__static_init#2)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): ERROR == &new UpdateStatus(UpdateStatus__static_init#5)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[4] == &new UpdateStatus(UpdateStatus__static_init#5)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED == &new UpdateStatus(UpdateStatus__static_init#4)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[3] == &new UpdateStatus(UpdateStatus__static_init#4)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING == &new UpdateStatus(UpdateStatus__static_init#3)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[2] == &new UpdateStatus(UpdateStatus__static_init#3)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): PENDING == &new UpdateStatus(UpdateStatus__static_init#1)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[0] == &new UpdateStatus(UpdateStatus__static_init#1)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED == &new UpdateStatus(UpdateStatus__static_init#6)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES[5] == &new UpdateStatus(UpdateStatus__static_init#6)
    //#post(com.dmdirc.updater.UpdateStatus__static_init): __Descendant_Table[com/dmdirc/updater/UpdateStatus] == &__Dispatch_Table
    //#post(com.dmdirc.updater.UpdateStatus__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#1) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#2) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#3) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#4) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#5) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus(UpdateStatus__static_init#6) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): new UpdateStatus[](UpdateStatus__static_init#7) num objects == 1
    //#post(com.dmdirc.updater.UpdateStatus__static_init): PENDING.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): ERROR.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED.__Tag == com/dmdirc/updater/UpdateStatus
    //#post(com.dmdirc.updater.UpdateStatus__static_init): PENDING.friendlyName == &"Pending"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): DOWNLOADING.friendlyName == &"Downloading"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLING.friendlyName == &"Installing"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): INSTALLED.friendlyName == &"Installed"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): ERROR.friendlyName == &"Error"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): RESTART_NEEDED.friendlyName == &"Restart needed"
    //#post(com.dmdirc.updater.UpdateStatus__static_init): $VALUES.length == 6
    //#unanalyzed(com.dmdirc.updater.UpdateStatus__static_init): Effects-of-calling:java.lang.Enum
    /** Update downloading. */
    DOWNLOADING("Downloading"), 
    /** Update installing. */
    INSTALLING("Installing"), 
    /** Update installed. */
    INSTALLED("Installed"), 
    /** Error updating. */
    ERROR("Error"), 
    /** Update requires restart. */
    RESTART_NEEDED("Restart needed");
    //#UpdateStatus.java:41: end of method: com.dmdirc.updater.UpdateStatus.com.dmdirc.updater.UpdateStatus__static_init
    
    /** Friendly name. */
    private final String friendlyName;
    
    /**
     * Instantiates a new update status.
     * 
     * @param friendlyName Friendly name for the status
     */
    UpdateStatus(final String friendlyName) {
    //#UpdateStatus.java:51: method: void com.dmdirc.updater.UpdateStatus.com.dmdirc.updater.UpdateStatus(String, int, String)
    //#input(void com.dmdirc.updater.UpdateStatus(String, int, String)): Param_1
    //#input(void com.dmdirc.updater.UpdateStatus(String, int, String)): Param_2
    //#input(void com.dmdirc.updater.UpdateStatus(String, int, String)): friendlyName
    //#input(void com.dmdirc.updater.UpdateStatus(String, int, String)): this
    //#output(void com.dmdirc.updater.UpdateStatus(String, int, String)): this.friendlyName
    //#post(void com.dmdirc.updater.UpdateStatus(String, int, String)): this.friendlyName == friendlyName
    //#post(void com.dmdirc.updater.UpdateStatus(String, int, String)): init'ed(this.friendlyName)
        this.friendlyName = friendlyName;
    }
    //#UpdateStatus.java:53: end of method: void com.dmdirc.updater.UpdateStatus.com.dmdirc.updater.UpdateStatus(String, int, String)
    
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return friendlyName;
    //#UpdateStatus.java:58: method: String com.dmdirc.updater.UpdateStatus.toString()
    //#input(String toString()): this
    //#input(String toString()): this.friendlyName
    //#output(String toString()): return_value
    //#post(String toString()): return_value == this.friendlyName
    //#post(String toString()): init'ed(return_value)
    //#UpdateStatus.java:58: end of method: String com.dmdirc.updater.UpdateStatus.toString()
    }
}
    //#UpdateStatus.java:: end of class: com.dmdirc.updater.UpdateStatus
