//# 0 errors, 186 messages
//#
/*
    //#FrameContainerComparator.java:1:1: class: com.dmdirc.FrameContainerComparator
    //#FrameContainerComparator.java:1:1: method: com.dmdirc.FrameContainerComparator.com.dmdirc.FrameContainerComparator__static_init
 * 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;

import java.io.Serializable;
import java.util.Comparator;

/**
 * Compares FrameContainers by name.
 */
public final class FrameContainerComparator implements Comparator<FrameContainer>,
    //#FrameContainerComparator.java:31: method: int com.dmdirc.FrameContainerComparator.compare(Object, Object)
    //#FrameContainerComparator.java:31: Warning: suspicious precondition
    //#    The precondition for x0.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.FrameContainerComparator
    //#    method: int compare(Object, Object)
    //#    suspicious precondition index: [3]
    //#    Attribs:  Soft
    //#FrameContainerComparator.java:31: Warning: suspicious precondition
    //#    The precondition for x1.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.FrameContainerComparator
    //#    method: int compare(Object, Object)
    //#    suspicious precondition index: [5]
    //#    Attribs:  Soft
    //#input(int compare(Object, Object)): com/dmdirc/Channel.__Descendant_Table[com/dmdirc/Channel]
    //#input(int compare(Object, Object)): com/dmdirc/Channel.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/Channel.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/CustomWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Channel]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/CustomWindow]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/FrameContainer]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/MessageTarget]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Query]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Raw]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Server]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/WritableFrameContainer]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCChatWindow]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCFrame]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCPlugin$3]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCSendWindow]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/FrameContainer.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/GlobalWindow.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(int compare(Object, Object)): com/dmdirc/GlobalWindow.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/GlobalWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/MessageTarget.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/Query.__Descendant_Table[com/dmdirc/Query]
    //#input(int compare(Object, Object)): com/dmdirc/Query.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/Query.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/Raw.__Descendant_Table[com/dmdirc/Raw]
    //#input(int compare(Object, Object)): com/dmdirc/Raw.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/Raw.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(int compare(Object, Object)): com/dmdirc/Server.__Descendant_Table[others]
    //#input(int compare(Object, Object)): com/dmdirc/Server.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/WritableFrameContainer.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/addons/dcc/DCCChatWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/addons/dcc/DCCFrame.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/addons/dcc/DCCPlugin$3.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): com/dmdirc/addons/dcc/DCCSendWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(Object, Object)): this
    //#input(int compare(Object, Object)): x0
    //#input(int compare(Object, Object)): x0.__Tag
    //#input(int compare(Object, Object)): x1
    //#input(int compare(Object, Object)): x1.__Tag
    //#output(int compare(Object, Object)): return_value
    //#pre[2] (int compare(Object, Object)): (soft) x0 != null
    //#pre[3] (int compare(Object, Object)): (soft) x0.__Tag in {com/dmdirc/Channel, com/dmdirc/CustomWindow, com/dmdirc/FrameContainer, com/dmdirc/GlobalWindow, com/dmdirc/MessageTarget, com/dmdirc/Query, com/dmdirc/Raw, com/dmdirc/Server, com/dmdirc/WritableFrameContainer, com/dmdirc/addons/dcc/DCCChatWindow, com/dmdirc/addons/dcc/DCCFrame, com/dmdirc/addons/dcc/DCCPlugin$3, com/dmdirc/addons/dcc/DCCSendWindow}
    //#pre[4] (int compare(Object, Object)): (soft) x1 != null
    //#pre[5] (int compare(Object, Object)): (soft) x1.__Tag in {com/dmdirc/Channel, com/dmdirc/CustomWindow, com/dmdirc/FrameContainer, com/dmdirc/GlobalWindow, com/dmdirc/MessageTarget, com/dmdirc/Query, com/dmdirc/Raw, com/dmdirc/Server, com/dmdirc/WritableFrameContainer, com/dmdirc/addons/dcc/DCCChatWindow, com/dmdirc/addons/dcc/DCCFrame, com/dmdirc/addons/dcc/DCCPlugin$3, com/dmdirc/addons/dcc/DCCSendWindow}
    //#post(int compare(Object, Object)): init'ed(return_value)
    //#unanalyzed(int compare(Object, Object)): Effects-of-calling:toString
    //#unanalyzed(int compare(Object, Object)): Effects-of-calling:java.lang.String:compareToIgnoreCase
    //#unanalyzed(int compare(Object, Object)): Effects-of-calling:java.lang.Object:hashCode
    //#unanalyzed(int compare(Object, Object)): Effects-of-calling:java.lang.Integer:valueOf
    //#unanalyzed(int compare(Object, Object)): Effects-of-calling:java.lang.Integer:compareTo
    //#FrameContainerComparator.java:31: end of method: int com.dmdirc.FrameContainerComparator.compare(Object, Object)
        Serializable {

    /**
     * A version number for this class. It should be changed whenever the class
     * structure is changed (or anything else that would prevent serialized
     * objects being unserialized with the new class).
     */
    private static final long serialVersionUID = 1;

    /**
     * Creates a new instance of FrameContainerComparator.
     */
    public FrameContainerComparator() {
        super();
    //#FrameContainerComparator.java:45: method: void com.dmdirc.FrameContainerComparator.com.dmdirc.FrameContainerComparator()
    }
    //#FrameContainerComparator.java:46: end of method: void com.dmdirc.FrameContainerComparator.com.dmdirc.FrameContainerComparator()

    /**
     * Compares two frame containers names.
     *
     * @param item1 The first container to compare
     * @param item2 The second container to compare
     * @return -1 if item1 is before item2, 0 if they're equal,
     * +1 if item1 is after item2.
     */
    public int compare(final FrameContainer item1, final FrameContainer item2) {
        if (sortBefore(item1, item2)) {
    //#FrameContainerComparator.java:57: method: int com.dmdirc.FrameContainerComparator.compare(FrameContainer, FrameContainer)
    //#FrameContainerComparator.java:57: Warning: suspicious precondition
    //#    The precondition for item1.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.FrameContainerComparator
    //#    method: int compare(FrameContainer, FrameContainer)
    //#    suspicious precondition index: [2]
    //#    Attribs:  Soft
    //#FrameContainerComparator.java:57: Warning: suspicious precondition
    //#    The precondition for item2.__Tag is not a contiguous range of values
    //#    severity: SUPPRESSED
    //#    class: com.dmdirc.FrameContainerComparator
    //#    method: int compare(FrameContainer, FrameContainer)
    //#    suspicious precondition index: [4]
    //#    Attribs:  Soft
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[com/dmdirc/Channel]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/CustomWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Channel]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/CustomWindow]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/FrameContainer]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/MessageTarget]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Query]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Raw]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/Server]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/WritableFrameContainer]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCChatWindow]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCFrame]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCPlugin$3]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[com/dmdirc/addons/dcc/DCCSendWindow]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/FrameContainer.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/MessageTarget.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[com/dmdirc/Query]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Query.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[com/dmdirc/Raw]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[others]
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/Server.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/WritableFrameContainer.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/addons/dcc/DCCChatWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/addons/dcc/DCCFrame.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/addons/dcc/DCCPlugin$3.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): com/dmdirc/addons/dcc/DCCSendWindow.__Dispatch_Table.toString()Ljava/lang/String;
    //#input(int compare(FrameContainer, FrameContainer)): item1
    //#input(int compare(FrameContainer, FrameContainer)): item1.__Tag
    //#input(int compare(FrameContainer, FrameContainer)): item2
    //#input(int compare(FrameContainer, FrameContainer)): item2.__Tag
    //#input(int compare(FrameContainer, FrameContainer)): this
    //#output(int compare(FrameContainer, FrameContainer)): return_value
    //#pre[1] (int compare(FrameContainer, FrameContainer)): (soft) item1 != null
    //#pre[2] (int compare(FrameContainer, FrameContainer)): (soft) item1.__Tag in {com/dmdirc/Channel, com/dmdirc/CustomWindow, com/dmdirc/FrameContainer, com/dmdirc/GlobalWindow, com/dmdirc/MessageTarget, com/dmdirc/Query, com/dmdirc/Raw, com/dmdirc/Server, com/dmdirc/WritableFrameContainer, com/dmdirc/addons/dcc/DCCChatWindow, com/dmdirc/addons/dcc/DCCFrame, com/dmdirc/addons/dcc/DCCPlugin$3, com/dmdirc/addons/dcc/DCCSendWindow}
    //#pre[3] (int compare(FrameContainer, FrameContainer)): (soft) item2 != null
    //#pre[4] (int compare(FrameContainer, FrameContainer)): (soft) item2.__Tag in {com/dmdirc/Channel, com/dmdirc/CustomWindow, com/dmdirc/FrameContainer, com/dmdirc/GlobalWindow, com/dmdirc/MessageTarget, com/dmdirc/Query, com/dmdirc/Raw, com/dmdirc/Server, com/dmdirc/WritableFrameContainer, com/dmdirc/addons/dcc/DCCChatWindow, com/dmdirc/addons/dcc/DCCFrame, com/dmdirc/addons/dcc/DCCPlugin$3, com/dmdirc/addons/dcc/DCCSendWindow}
    //#presumption(int compare(FrameContainer, FrameContainer)): java.lang.Integer:valueOf(...)@65 != null
    //#presumption(int compare(FrameContainer, FrameContainer)): toString(...)@62 != null
    //#post(int compare(FrameContainer, FrameContainer)): init'ed(return_value)
    //#test_vector(int compare(FrameContainer, FrameContainer)): java.lang.String:compareToIgnoreCase(...)@62: {-2_147_483_648..-1, 1..4_294_967_295}, {0}
            return -1;
        } else if (sortAfter(item1, item2)) {
            return 1;
        } else {
            final int position = item1.toString().compareToIgnoreCase(
    //#FrameContainerComparator.java:62: Warning: call too complex - analysis skipped
    //#    call on String toString()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.FrameContainerComparator
    //#    method: int compare(FrameContainer, FrameContainer)
    //#    unanalyzed callee: String toString()
                    item2.toString());
            if (position == 0) {
                return Integer.valueOf(item1.hashCode()).compareTo(
                        Integer.valueOf(item2.hashCode()));
            } else {
                return position;
    //#FrameContainerComparator.java:68: end of method: int com.dmdirc.FrameContainerComparator.compare(FrameContainer, FrameContainer)
            }
        }
    }

    /**
     * Compares frame container types and checks order preferences.
     *
     * @param item1 The new container to be tested
     * @param item2 The existing container to test against
     * @return True iff the new container should be before the old container
     */
    private boolean sortBefore(final FrameContainer item1,
            final FrameContainer item2) {

        return getPosition(item1) < getPosition(item2);
    //#FrameContainerComparator.java:83: method: bool com.dmdirc.FrameContainerComparator.sortBefore(FrameContainer, FrameContainer)
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[com/dmdirc/Channel]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[others]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[others]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[com/dmdirc/Query]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[others]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[com/dmdirc/Raw]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[others]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[others]
    //#input(bool sortBefore(FrameContainer, FrameContainer)): item1
    //#input(bool sortBefore(FrameContainer, FrameContainer)): item1.__Tag
    //#input(bool sortBefore(FrameContainer, FrameContainer)): item2
    //#input(bool sortBefore(FrameContainer, FrameContainer)): item2.__Tag
    //#input(bool sortBefore(FrameContainer, FrameContainer)): this
    //#output(bool sortBefore(FrameContainer, FrameContainer)): return_value
    //#post(bool sortBefore(FrameContainer, FrameContainer)): init'ed(return_value)
    //#FrameContainerComparator.java:83: end of method: bool com.dmdirc.FrameContainerComparator.sortBefore(FrameContainer, FrameContainer)
    }

    /**
     * Compares frame container types and checks order preferences.
     *
     * @param item1 The new container to be tested
     * @param item2 The existing container to test against
     * @return True iff the new container should be after the old container
     */
    private boolean sortAfter(final FrameContainer item1,
            final FrameContainer item2) {
        return getPosition(item1) > getPosition(item2);
    //#FrameContainerComparator.java:95: method: bool com.dmdirc.FrameContainerComparator.sortAfter(FrameContainer, FrameContainer)
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[com/dmdirc/Channel]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Channel.__Descendant_Table[others]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[others]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[com/dmdirc/Query]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Query.__Descendant_Table[others]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[com/dmdirc/Raw]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Raw.__Descendant_Table[others]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): com/dmdirc/Server.__Descendant_Table[others]
    //#input(bool sortAfter(FrameContainer, FrameContainer)): item1
    //#input(bool sortAfter(FrameContainer, FrameContainer)): item1.__Tag
    //#input(bool sortAfter(FrameContainer, FrameContainer)): item2
    //#input(bool sortAfter(FrameContainer, FrameContainer)): item2.__Tag
    //#input(bool sortAfter(FrameContainer, FrameContainer)): this
    //#output(bool sortAfter(FrameContainer, FrameContainer)): return_value
    //#post(bool sortAfter(FrameContainer, FrameContainer)): init'ed(return_value)
    //#FrameContainerComparator.java:95: end of method: bool com.dmdirc.FrameContainerComparator.sortAfter(FrameContainer, FrameContainer)
    }

    /**
     * Returns an integer corresponding to the expected order of a frame
     * container.
     *
     * @param item The frame container to be tested
     * @return Position of the frame container
     */
    private int getPosition(final FrameContainer item) {
        if (item instanceof GlobalWindow) {
    //#FrameContainerComparator.java:106: method: int com.dmdirc.FrameContainerComparator.getPosition(FrameContainer)
    //#input(int getPosition(FrameContainer)): com/dmdirc/Channel.__Descendant_Table[com/dmdirc/Channel]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Channel.__Descendant_Table[others]
    //#input(int getPosition(FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[com/dmdirc/GlobalWindow]
    //#input(int getPosition(FrameContainer)): com/dmdirc/GlobalWindow.__Descendant_Table[others]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Query.__Descendant_Table[com/dmdirc/Query]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Query.__Descendant_Table[others]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Raw.__Descendant_Table[com/dmdirc/Raw]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Raw.__Descendant_Table[others]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Server.__Descendant_Table[com/dmdirc/Server]
    //#input(int getPosition(FrameContainer)): com/dmdirc/Server.__Descendant_Table[others]
    //#input(int getPosition(FrameContainer)): item
    //#input(int getPosition(FrameContainer)): item.__Tag
    //#output(int getPosition(FrameContainer)): return_value
    //#post(int getPosition(FrameContainer)): return_value in {0..5}
    //#test_vector(int getPosition(FrameContainer)): item.__Tag: {310_784}, {315_904}, {315_392}, {306_688}, {314_880}
            return 0;
        } else if (item instanceof Server) {
            return 1;
        } else if (item instanceof Raw) {
            return 2;
        } else if (item instanceof Channel) {
            return 3;
        } else if (item instanceof Query) {
            return 4;
        } else {
            return 5;
    //#FrameContainerComparator.java:117: end of method: int com.dmdirc.FrameContainerComparator.getPosition(FrameContainer)
        }
    }

}
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Descendant_Table[com/dmdirc/FrameContainerComparator]
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.compare(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)I
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.compare(Ljava/lang/Object;Ljava/lang/Object;)I
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.getPosition(Lcom/dmdirc/FrameContainer;)I
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.sortAfter(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)Z
    //#output(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.sortBefore(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)Z
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Descendant_Table[com/dmdirc/FrameContainerComparator] == &__Dispatch_Table
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.compare(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)I == &compare
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.compare(Ljava/lang/Object;Ljava/lang/Object;)I == &compare
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.getPosition(Lcom/dmdirc/FrameContainer;)I == &getPosition
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.sortAfter(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)Z == &sortAfter
    //#post(com.dmdirc.FrameContainerComparator__static_init): __Dispatch_Table.sortBefore(Lcom/dmdirc/FrameContainer;Lcom/dmdirc/FrameContainer;)Z == &sortBefore
    //#FrameContainerComparator.java:: end of method: com.dmdirc.FrameContainerComparator.com.dmdirc.FrameContainerComparator__static_init
    //#FrameContainerComparator.java:: end of class: com.dmdirc.FrameContainerComparator
