//# 0 errors, 155 messages
//#
/*
    //#LinePosition.java:1:1: class: com.dmdirc.addons.ui_swing.textpane.LinePosition
    //#LinePosition.java:1:1: method: com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition__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.addons.ui_swing.textpane;

/**
 * Holds information about a range of text.
 */
public class LinePosition {

    /** Starting line. */
    private int startLine;
    /** Ending line. */
    private int endLine;
    /** Starting position. */
    private int startPos;
    /** Ending position. */
    private int endPos;

    /**
     * Constructs a new line position.
     * 
     * @param startLine Starting line
     * @param endLine Ending line
     * @param startPos Starting position
     * @param endPos Ending position
     */
    public LinePosition(final int startLine, final int startPos,
            final int endLine, final int endPos) {
    //#LinePosition.java:48: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): endLine
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): endPos
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): startLine
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): startPos
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.endLine
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.endPos
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.startLine
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.startPos
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.endLine == endLine
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): init'ed(this.endLine)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.endPos == endPos
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): init'ed(this.endPos)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.startLine == startLine
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): init'ed(this.startLine)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): this.startPos == startPos
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)): init'ed(this.startPos)
        this.startLine = startLine;
        this.endLine = endLine;
        this.startPos = startPos;
        this.endPos = endPos;
    }
    //#LinePosition.java:53: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition(int, int, int, int)

    /**
     * Constructs a new line position.
     *
     * @param position Position to create position from
     */
    public LinePosition(final LinePosition position) {
    //#LinePosition.java:60: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Descendant_Table[com/dmdirc/addons/ui_swing/textpane/LinePosition]
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Descendant_Table[others]
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Dispatch_Table.getEndLine()I
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Dispatch_Table.getEndPos()I
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Dispatch_Table.getStartLine()I
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): __Dispatch_Table.getStartPos()I
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.__Tag
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.endLine
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.endPos
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.startLine
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.startPos
    //#input(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.endLine
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.endPos
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.startLine
    //#output(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.startPos
    //#pre[1] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position != null
    //#pre[2] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): position.__Tag == com/dmdirc/addons/ui_swing/textpane/LinePosition
    //#pre[3] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(position.endLine)
    //#pre[4] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(position.endPos)
    //#pre[5] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(position.startLine)
    //#pre[6] (void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(position.startPos)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.endLine == position.endLine
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(this.endLine)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.endPos == position.endPos
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(this.endPos)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.startLine == position.startLine
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(this.startLine)
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): this.startPos == position.startPos
    //#post(void com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)): init'ed(this.startPos)
        this.startLine = position.getStartLine();
        this.endLine = position.getEndLine();
        this.startPos = position.getStartPos();
        this.endPos = position.getEndPos();
    }
    //#LinePosition.java:65: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition(LinePosition)

    /**
     * Returns the end line for this position.
     * 
     * @return End line
     */
    public int getEndLine() {
        return endLine;
    //#LinePosition.java:73: method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getEndLine()
    //#input(int getEndLine()): this
    //#input(int getEndLine()): this.endLine
    //#output(int getEndLine()): return_value
    //#pre[2] (int getEndLine()): init'ed(this.endLine)
    //#post(int getEndLine()): return_value == this.endLine
    //#post(int getEndLine()): init'ed(return_value)
    //#LinePosition.java:73: end of method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getEndLine()
    }

    /**
     * Returns the end position for this position.
     * 
     * @return End position
     */
    public int getEndPos() {
        return endPos;
    //#LinePosition.java:82: method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getEndPos()
    //#input(int getEndPos()): this
    //#input(int getEndPos()): this.endPos
    //#output(int getEndPos()): return_value
    //#pre[2] (int getEndPos()): init'ed(this.endPos)
    //#post(int getEndPos()): return_value == this.endPos
    //#post(int getEndPos()): init'ed(return_value)
    //#LinePosition.java:82: end of method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getEndPos()
    }

    /**
     * Returns the start line for this position.
     * 
     * @return Start line
     */
    public int getStartLine() {
        return startLine;
    //#LinePosition.java:91: method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getStartLine()
    //#input(int getStartLine()): this
    //#input(int getStartLine()): this.startLine
    //#output(int getStartLine()): return_value
    //#pre[2] (int getStartLine()): init'ed(this.startLine)
    //#post(int getStartLine()): return_value == this.startLine
    //#post(int getStartLine()): init'ed(return_value)
    //#LinePosition.java:91: end of method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getStartLine()
    }

    /**
     * Returns the start position for this position.
     * 
     * @return Start position
     */
    public int getStartPos() {
        return startPos;
    //#LinePosition.java:100: method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getStartPos()
    //#input(int getStartPos()): this
    //#input(int getStartPos()): this.startPos
    //#output(int getStartPos()): return_value
    //#pre[2] (int getStartPos()): init'ed(this.startPos)
    //#post(int getStartPos()): return_value == this.startPos
    //#post(int getStartPos()): init'ed(return_value)
    //#LinePosition.java:100: end of method: int com.dmdirc.addons.ui_swing.textpane.LinePosition.getStartPos()
    }
    
    /**
     * Sets the positions end line.
     * 
     * @param endLine new end line
     */
    public void setEndLine(int endLine) {
        this.endLine = endLine;
    //#LinePosition.java:109: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setEndLine(int)
    //#input(void setEndLine(int)): endLine
    //#input(void setEndLine(int)): this
    //#output(void setEndLine(int)): this.endLine
    //#post(void setEndLine(int)): this.endLine == endLine
    //#post(void setEndLine(int)): init'ed(this.endLine)
    }
    //#LinePosition.java:110: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setEndLine(int)

    /**
     * Sets the positions end line.
     * 
     * @param endPos new end line
     */
    public void setEndPos(int endPos) {
        this.endPos = endPos;
    //#LinePosition.java:118: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setEndPos(int)
    //#input(void setEndPos(int)): endPos
    //#input(void setEndPos(int)): this
    //#output(void setEndPos(int)): this.endPos
    //#post(void setEndPos(int)): this.endPos == endPos
    //#post(void setEndPos(int)): init'ed(this.endPos)
    }
    //#LinePosition.java:119: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setEndPos(int)

    /**
     * Sets the positions start line.
     * 
     * @param startLine new start line
     */
    public void setStartLine(int startLine) {
        this.startLine = startLine;
    //#LinePosition.java:127: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setStartLine(int)
    //#input(void setStartLine(int)): startLine
    //#input(void setStartLine(int)): this
    //#output(void setStartLine(int)): this.startLine
    //#post(void setStartLine(int)): this.startLine == startLine
    //#post(void setStartLine(int)): init'ed(this.startLine)
    }
    //#LinePosition.java:128: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setStartLine(int)

    /**
     * Sets the positions start position.
     * 
     * @param startPos new start position
     */
    public void setStartPos(int startPos) {
        this.startPos = startPos;
    //#LinePosition.java:136: method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setStartPos(int)
    //#input(void setStartPos(int)): startPos
    //#input(void setStartPos(int)): this
    //#output(void setStartPos(int)): this.startPos
    //#post(void setStartPos(int)): this.startPos == startPos
    //#post(void setStartPos(int)): init'ed(this.startPos)
    }
    //#LinePosition.java:137: end of method: void com.dmdirc.addons.ui_swing.textpane.LinePosition.setStartPos(int)
    
    /** {@inheritDoc} */
    @Override
    public String toString() {
        return "Position[" + startLine + ", " + startPos + ", " + endLine + ", " + endPos + "]";
    //#LinePosition.java:142: method: String com.dmdirc.addons.ui_swing.textpane.LinePosition.toString()
    //#input(String toString()): ", "._tainted
    //#input(String toString()): "Position["._tainted
    //#input(String toString()): "]"._tainted
    //#input(String toString()): this
    //#input(String toString()): this.endLine
    //#input(String toString()): this.endPos
    //#input(String toString()): this.startLine
    //#input(String toString()): this.startPos
    //#output(String toString()): java.lang.StringBuilder:toString(...)._tainted
    //#output(String toString()): return_value
    //#new obj(String toString()): java.lang.StringBuilder:toString(...)
    //#pre[2] (String toString()): init'ed(this.endLine)
    //#pre[3] (String toString()): init'ed(this.endPos)
    //#pre[4] (String toString()): init'ed(this.startLine)
    //#pre[5] (String toString()): init'ed(this.startPos)
    //#post(String toString()): java.lang.StringBuilder:toString(...)._tainted == 0
    //#post(String toString()): return_value == &java.lang.StringBuilder:toString(...)
    //#LinePosition.java:142: end of method: String com.dmdirc.addons.ui_swing.textpane.LinePosition.toString()
    }
}
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/textpane/LinePosition]
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getEndLine()I
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getEndPos()I
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getStartLine()I
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getStartPos()I
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setEndLine(I)V
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setEndPos(I)V
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setStartLine(I)V
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setStartPos(I)V
    //#output(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.toString()Ljava/lang/String;
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Descendant_Table[com/dmdirc/addons/ui_swing/textpane/LinePosition] == &__Dispatch_Table
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getEndLine()I == &getEndLine
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getEndPos()I == &getEndPos
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getStartLine()I == &getStartLine
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.getStartPos()I == &getStartPos
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setEndLine(I)V == &setEndLine
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setEndPos(I)V == &setEndPos
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setStartLine(I)V == &setStartLine
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.setStartPos(I)V == &setStartPos
    //#post(com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init): __Dispatch_Table.toString()Ljava/lang/String; == &toString
    //#LinePosition.java:: end of method: com.dmdirc.addons.ui_swing.textpane.LinePosition.com.dmdirc.addons.ui_swing.textpane.LinePosition__static_init
    //#LinePosition.java:: end of class: com.dmdirc.addons.ui_swing.textpane.LinePosition
