Package Torello.CSS
Class CSSToken
- java.lang.Object
-
- Torello.CSS.CSSToken
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.CharSequence
,java.lang.Comparable<java.lang.CharSequence>
- Direct Known Subclasses:
BadStr
,BadURL
,CDC
,CDO
,Comment
,Delimiter
,Identifier
,Num
,Punct
,Str
,UnicodeRange
,URLToken
,Whitespace
public abstract class CSSToken extends java.lang.Object implements java.lang.CharSequence, java.io.Serializable, java.lang.Comparable<java.lang.CharSequence>
The root abstract-parent class for all CSSToken Sub-Classes.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/CSS/CSSToken.java
- Open New Browser-Tab: Torello/CSS/CSSToken.java
File Size: 29,995 Bytes Line Count: 741 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
Public String-Field, This Class' only Instance-Field Modifier and Type Field String
str
-
Method Summary
Methods: interface java.lang.CharSequence Modifier and Type Method char
charAt(int index)
int
length()
String
subSequence(int start, int end)
String
toString()
Methods: interface java.lang.Comparable Modifier and Type Method int
compareTo(CharSequence other)
Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Loop Optimizer: Checks 'this' instance' Sub-Type Modifier and Type Method boolean
isAtKeyword()
boolean
isBadStr()
boolean
isBadURL()
boolean
isCDC()
boolean
isCDO()
boolean
isComment()
boolean
isDelimiter()
boolean
isDelimiter(char c)
boolean
isDimension()
boolean
isFunc()
boolean
isHash()
boolean
isIdentifier()
boolean
isNum()
boolean
isPercentage()
boolean
isPunct()
boolean
isPunct(char c)
boolean
isStr()
boolean
isUnicodeRange()
boolean
isURL()
boolean
isWhitespace()
Loop Optimizer: Casts 'this' instance to a Sub-Type Modifier and Type Method AtKeyword
asAtKeyword()
BadStr
asBadStr()
BadURL
asBadURL()
CDC
asCDC()
CDO
asCDO()
Comment
asComment()
Delimiter
asDelimiter()
Dimension
asDimension()
Func
asFunc()
Hash
asHash()
Identifier
asIdentifier()
Num
asNum()
Percentage
asPercentage()
Punct
asPunct()
Str
asStr()
UnicodeRange
asUnicodeRange()
URLToken
asURL()
Whitespace
asWhitespace()
Loop Optimizer: Checks & then Casts 'this' instance to a Sub-Type Modifier and Type Method AtKeyword
ifAtKeyword()
BadStr
ifBadStr()
BadURL
ifBadURL()
CDC
ifCDC()
CDO
ifCDO()
Comment
ifComment()
Delimiter
ifDelimiter()
Delimiter
ifDelimiter(char c)
Dimension
ifDimension()
Func
ifFunc()
Hash
ifHash()
Identifier
ifIdentifier()
Num
ifNum()
Percentage
ifPercentage()
Punct
ifPunct()
Punct
ifPunct(char c)
Str
ifStr()
UnicodeRange
ifUnicodeRange()
URLToken
ifURL()
Whitespace
ifWhitespace()
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable
. Using theSerializable
Implementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final long serialVersionUID = 1;
-
str
public final java.lang.String str
The "Reconstituted Character Data" (re-built from the input Code-Points array) that comprise thisCSSToken
.
-
-
Method Detail
-
charAt
public final char charAt(int index)
- Specified by:
charAt
in interfacejava.lang.CharSequence
-
length
public final int length()
- Specified by:
length
in interfacejava.lang.CharSequence
-
subSequence
public final java.lang.String subSequence(int start, int end)
- Specified by:
subSequence
in interfacejava.lang.CharSequence
-
toString
public final java.lang.String toString()
- Specified by:
toString
in interfacejava.lang.CharSequence
- Overrides:
toString
in classjava.lang.Object
-
compareTo
public final int compareTo(java.lang.CharSequence other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<java.lang.CharSequence>
-
equals
public final boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
isAtKeyword
public boolean isAtKeyword()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofAtKeyword
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theAtKeyword
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
AtKeyword.isAtKeyword()
-
isBadStr
public boolean isBadStr()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofBadStr
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theBadStr
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
BadStr.isBadStr()
-
isBadURL
public boolean isBadURL()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofBadURL
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theBadURL
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
BadURL.isBadURL()
-
isCDC
public boolean isCDC()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofCDC
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theCDC
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
CDC.isCDC()
-
isCDO
public boolean isCDO()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofCDO
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theCDO
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
CDO.isCDO()
-
isComment
public boolean isComment()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofComment
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theComment
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Comment.isComment()
-
isDelimiter
public boolean isDelimiter()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofDelimiter
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theDelimiter
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Delimiter.isDelimiter()
-
isDelimiter
public boolean isDelimiter(char c)
Checks whether'this'
instance is aDelimiter
instance.- Parameters:
c
- Any Javachar
.- Returns:
TRUE
if'this'
is a delimiter containing'c'
.
-
isDimension
public boolean isDimension()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofDimension
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theDimension
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Dimension.isDimension()
-
isFunc
public boolean isFunc()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofFunc
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theFunc
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Func.isFunc()
-
isHash
public boolean isHash()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofHash
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theHash
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Hash.isHash()
-
isIdentifier
public boolean isIdentifier()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofIdentifier
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theIdentifier
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Identifier.isIdentifier()
-
isNum
public boolean isNum()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofNum
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theNum
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Num.isNum()
-
isPercentage
public boolean isPercentage()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofPercentage
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually thePercentage
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Percentage.isPercentage()
-
isPunct
public boolean isPunct()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofPunct
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually thePunct
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Punct.isPunct()
-
isPunct
public final boolean isPunct(char c)
Checks whether'this'
instance is a punctuation character- Parameters:
c
- Any Javachar
.- Returns:
TRUE
if'this'
is a punctuation of'c'
.
-
isStr
public boolean isStr()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofStr
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theStr
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Str.isStr()
-
isUnicodeRange
public boolean isUnicodeRange()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofUnicodeRange
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theUnicodeRange
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
UnicodeRange.isUnicodeRange()
-
isURL
public boolean isURL()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofURLToken
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theURLToken
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
URLToken.isURL()
-
isWhitespace
public boolean isWhitespace()
Loop Optimization: This method only returnsTRUE
if this is an actual instance ofWhitespace
.- Returns:
- This method returns
FALSE
for all instances ofCSSToken
, except when'this'
instance is actually theWhitespace
Subclass.
That class has overridden this method, and returnsTRUE
. - See Also:
Whitespace.isWhitespace()
-
asAtKeyword
public final AtKeyword asAtKeyword()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofAtKeyword
Note that if this cast fails (which it must if'this'
is not actually an instance ofAtKeyword
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isAtKeyword
, which is the entire purpose.
-
asBadStr
public final BadStr asBadStr()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofBadStr
Note that if this cast fails (which it must if'this'
is not actually an instance ofBadStr
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isBadStr
, which is the entire purpose.
-
asBadURL
public final BadURL asBadURL()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofBadURL
Note that if this cast fails (which it must if'this'
is not actually an instance ofBadURL
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isBadURL
, which is the entire purpose.
-
asCDC
public final CDC asCDC()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofCDC
Note that if this cast fails (which it must if'this'
is not actually an instance ofCDC
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isCDC
, which is the entire purpose.
-
asCDO
public final CDO asCDO()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofCDO
Note that if this cast fails (which it must if'this'
is not actually an instance ofCDO
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isCDO
, which is the entire purpose.
-
asComment
public final Comment asComment()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofComment
Note that if this cast fails (which it must if'this'
is not actually an instance ofComment
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isComment
, which is the entire purpose.
-
asDelimiter
public final Delimiter asDelimiter()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofDelimiter
Note that if this cast fails (which it must if'this'
is not actually an instance ofDelimiter
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isDelimiter
, which is the entire purpose.
-
asDimension
public final Dimension asDimension()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofDimension
Note that if this cast fails (which it must if'this'
is not actually an instance ofDimension
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isDimension
, which is the entire purpose.
-
asFunc
public final Func asFunc()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofFunc
Note that if this cast fails (which it must if'this'
is not actually an instance ofFunc
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isFunc
, which is the entire purpose.
-
asHash
public final Hash asHash()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofHash
Note that if this cast fails (which it must if'this'
is not actually an instance ofHash
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isHash
, which is the entire purpose.
-
asIdentifier
public final Identifier asIdentifier()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofIdentifier
Note that if this cast fails (which it must if'this'
is not actually an instance ofIdentifier
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isIdentifier
, which is the entire purpose.
-
asNum
public final Num asNum()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofNum
Note that if this cast fails (which it must if'this'
is not actually an instance ofNum
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isNum
, which is the entire purpose.
-
asPercentage
public final Percentage asPercentage()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofPercentage
Note that if this cast fails (which it must if'this'
is not actually an instance ofPercentage
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isPercentage
, which is the entire purpose.
-
asPunct
public final Punct asPunct()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofPunct
Note that if this cast fails (which it must if'this'
is not actually an instance ofPunct
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isPunct
, which is the entire purpose.
-
asStr
public final Str asStr()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofStr
Note that if this cast fails (which it must if'this'
is not actually an instance ofStr
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isStr
, which is the entire purpose.
-
asUnicodeRange
public final UnicodeRange asUnicodeRange()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofUnicodeRange
Note that if this cast fails (which it must if'this'
is not actually an instance ofUnicodeRange
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isUnicodeRange
, which is the entire purpose.
-
asURL
public final URLToken asURL()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofURLToken
Note that if this cast fails (which it must if'this'
is not actually an instance ofURLToken
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isURLToken
, which is the entire purpose.
-
asWhitespace
public final Whitespace asWhitespace()
Loop Optimization: This method will attempt to cast'this'
instance to an instance ofWhitespace
Note that if this cast fails (which it must if'this'
is not actually an instance ofWhitespace
), then this method throws aClassCastException
.
Note that this method is declared final, and cannot be overloaded by subclasses.- Returns:
- If this method succeeds, it means no
ClassCastException
has thrown, and'this'
instance is returned. Please note that the return-type of this method isWhitespace
, which is the entire purpose.
-
ifAtKeyword
public AtKeyword ifAtKeyword()
Loop Optimization: When this method is invoked on an instance of sub-classAtKeyword
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofAtKeyword
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
AtKeyword.ifAtKeyword()
-
ifBadStr
public BadStr ifBadStr()
Loop Optimization: When this method is invoked on an instance of sub-classBadStr
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofBadStr
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
BadStr.ifBadStr()
-
ifBadURL
public BadURL ifBadURL()
Loop Optimization: When this method is invoked on an instance of sub-classBadURL
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofBadURL
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
BadURL.ifBadURL()
-
ifCDC
public CDC ifCDC()
Loop Optimization: When this method is invoked on an instance of sub-classCDC
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofCDC
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
CDC.ifCDC()
-
ifCDO
public CDO ifCDO()
Loop Optimization: When this method is invoked on an instance of sub-classCDO
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofCDO
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
CDO.ifCDO()
-
ifComment
public Comment ifComment()
Loop Optimization: When this method is invoked on an instance of sub-classComment
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofComment
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Comment.ifComment()
-
ifDelimiter
public Delimiter ifDelimiter()
Loop Optimization: When this method is invoked on an instance of sub-classDelimiter
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofDelimiter
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Delimiter.ifDelimiter()
-
ifDelimiter
public final Delimiter ifDelimiter(char c)
This one actually does this cute little dance, and then and goes and makes funny faces at your mother.- Parameters:
c
- The Delimiter Character.- Returns:
TRUE
if and only'this'
is an instance ofDelimiter
, and one whoseDelimiter.c
matches parameter'c'
.- See Also:
Delimiter.isDelimiter()
-
ifDimension
public Dimension ifDimension()
Loop Optimization: When this method is invoked on an instance of sub-classDimension
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofDimension
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Dimension.ifDimension()
-
ifFunc
public Func ifFunc()
Loop Optimization: When this method is invoked on an instance of sub-classFunc
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofFunc
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Func.ifFunc()
-
ifHash
public Hash ifHash()
Loop Optimization: When this method is invoked on an instance of sub-classHash
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofHash
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Hash.ifHash()
-
ifIdentifier
public Identifier ifIdentifier()
Loop Optimization: When this method is invoked on an instance of sub-classIdentifier
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofIdentifier
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Identifier.ifIdentifier()
-
ifNum
public Num ifNum()
Loop Optimization: When this method is invoked on an instance of sub-classNum
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofNum
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Num.ifNum()
-
ifPercentage
public Percentage ifPercentage()
Loop Optimization: When this method is invoked on an instance of sub-classPercentage
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofPercentage
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Percentage.ifPercentage()
-
ifPunct
public Punct ifPunct()
Loop Optimization: When this method is invoked on an instance of sub-classPunct
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofPunct
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Punct.ifPunct()
-
ifPunct
public final Punct ifPunct(char c)
This one actually does this cute little dance, and then and goes and makes funny faces at your mother.- Parameters:
c
- The Punctuation Character.- Returns:
TRUE
if and only'this'
is an instance ofPunct
, and one whosec field
matches parameter'c'
.- See Also:
Punct.isPunct()
-
ifStr
public Str ifStr()
Loop Optimization: When this method is invoked on an instance of sub-classStr
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofStr
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Str.ifStr()
-
ifUnicodeRange
public UnicodeRange ifUnicodeRange()
Loop Optimization: When this method is invoked on an instance of sub-classUnicodeRange
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofUnicodeRange
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
UnicodeRange.ifUnicodeRange()
-
ifURL
public URLToken ifURL()
Loop Optimization: When this method is invoked on an instance of sub-classURLToken
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofURLToken
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
URLToken.ifURL()
-
ifWhitespace
public Whitespace ifWhitespace()
Loop Optimization: When this method is invoked on an instance of sub-classWhitespace
this method produces'this'
instance.- Returns:
- This method shall return
null
, always, except when'this'
is an actual instance ofWhitespace
. When so, this method simply returns'this'
. All other sub-classes of (abstract
) classCSSToken
inherit this method, and therefore return null. - See Also:
Whitespace.ifWhitespace()
-
-