001 /*
002 * Copyright (c) 2008 Mozilla Foundation
003 *
004 * Permission is hereby granted, free of charge, to any person obtaining a
005 * copy of this software and associated documentation files (the "Software"),
006 * to deal in the Software without restriction, including without limitation
007 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
008 * and/or sell copies of the Software, and to permit persons to whom the
009 * Software is furnished to do so, subject to the following conditions:
010 *
011 * The above copyright notice and this permission notice shall be included in
012 * all copies or substantial portions of the Software.
013 *
014 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
017 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
019 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
020 * DEALINGS IN THE SOFTWARE.
021 */
022
023 package nu.validator.htmlparser.impl;
024
025 public class PushedLocation {
026 private final int line;
027
028 private final int linePrev;
029
030 private final int col;
031
032 private final int colPrev;
033
034 private final boolean nextCharOnNewLine;
035
036 private final String publicId;
037
038 private final String systemId;
039
040 private final PushedLocation next;
041
042 /**
043 * @param line
044 * @param linePrev
045 * @param col
046 * @param colPrev
047 * @param nextCharOnNewLine
048 * @param publicId
049 * @param systemId
050 * @param next
051 */
052 public PushedLocation(int line, int linePrev, int col, int colPrev,
053 boolean nextCharOnNewLine, String publicId, String systemId,
054 PushedLocation next) {
055 this.line = line;
056 this.linePrev = linePrev;
057 this.col = col;
058 this.colPrev = colPrev;
059 this.nextCharOnNewLine = nextCharOnNewLine;
060 this.publicId = publicId;
061 this.systemId = systemId;
062 this.next = next;
063 }
064
065 /**
066 * Returns the line.
067 *
068 * @return the line
069 */
070 public int getLine() {
071 return line;
072 }
073
074 /**
075 * Returns the linePrev.
076 *
077 * @return the linePrev
078 */
079 public int getLinePrev() {
080 return linePrev;
081 }
082
083 /**
084 * Returns the col.
085 *
086 * @return the col
087 */
088 public int getCol() {
089 return col;
090 }
091
092 /**
093 * Returns the colPrev.
094 *
095 * @return the colPrev
096 */
097 public int getColPrev() {
098 return colPrev;
099 }
100
101 /**
102 * Returns the nextCharOnNewLine.
103 *
104 * @return the nextCharOnNewLine
105 */
106 public boolean isNextCharOnNewLine() {
107 return nextCharOnNewLine;
108 }
109
110 /**
111 * Returns the publicId.
112 *
113 * @return the publicId
114 */
115 public String getPublicId() {
116 return publicId;
117 }
118
119 /**
120 * Returns the systemId.
121 *
122 * @return the systemId
123 */
124 public String getSystemId() {
125 return systemId;
126 }
127
128 /**
129 * Returns the next.
130 *
131 * @return the next
132 */
133 public PushedLocation getNext() {
134 return next;
135 }
136 }