Package com.helger.css
Class CSSSourceLocation
java.lang.Object
com.helger.css.CSSSourceLocation
Defines the source location of an object when reading CSS from a stream. It
consists of the position of the start token and the position of the end
token.
- Author:
- Philip Helger
-
Constructor Summary
ConstructorsConstructorDescriptionCSSSourceLocation(CSSSourceArea aFirstTokenArea, CSSSourceArea aLastTokenArea) Constructor. -
Method Summary
-
Constructor Details
-
CSSSourceLocation
public CSSSourceLocation(@Nullable CSSSourceArea aFirstTokenArea, @Nullable CSSSourceArea aLastTokenArea) Constructor.- Parameters:
aFirstTokenArea- Area of the first token. May benullif the last token area is notnull.aLastTokenArea- Area of the last token. May benullif the first token area is notnull.- Throws:
IllegalArgumentException- if both areas arenull.
-
-
Method Details
-
getFirstTokenArea
- Returns:
- The area of the first token. May be
nullif no such information is available.
-
hasFirstTokenArea
public boolean hasFirstTokenArea()- Returns:
trueif the first token area is present
-
getFirstTokenBeginLineNumber
- Returns:
- The line number where the first token begins (incl.). May be -1 if not such token is available.
-
getFirstTokenBeginColumnNumber
- Returns:
- The column number where the first token begins (incl.). May be -1 if not such token is available.
-
getFirstTokenEndLineNumber
- Returns:
- The line number where the fist token ends (incl.). May be -1 if not such token is available.
-
getFirstTokenEndColumnNumber
- Returns:
- The column number where the first token ends (incl.). May be -1 if not such token is available.
-
getLastTokenArea
- Returns:
- The area of the last token. May be
nullif no such information is available.
-
hasLastTokenArea
public boolean hasLastTokenArea()- Returns:
trueif the last token area is present
-
getLastTokenBeginLineNumber
- Returns:
- The line number where the last token begins (incl.). May be -1 if not such token is available.
-
getLastTokenBeginColumnNumber
- Returns:
- The column number where the last token begins (incl.). May be -1 if not such token is available.
-
getLastTokenEndLineNumber
- Returns:
- The line number where the fist token ends (incl.). May be -1 if not such token is available.
-
getLastTokenEndColumnNumber
- Returns:
- The column number where the last token ends (incl.). May be -1 if not such token is available.
-
getFirstTokenLocationAsString
- Returns:
- The location of the first token as a simple string. May be
null.
-
getLastTokenLocationAsString
- Returns:
- The location of the last token as a simple string. May be
null.
-
getLocationAsString
-
equals
-
hashCode
public int hashCode() -
toString
-