Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.w3c.flute.parser
Class LexicalUnitImpl  view LexicalUnitImpl download LexicalUnitImpl.java

java.lang.Object
  extended byorg.w3c.flute.parser.LexicalUnitImpl
All Implemented Interfaces:
org.w3c.css.sac.LexicalUnit

class LexicalUnitImpl
extends java.lang.Object
implements org.w3c.css.sac.LexicalUnit

Version:
$Revision: 1.3 $

Field Summary
(package private)  int column
           
(package private)  short dimension
           
(package private)  float f
           
(package private)  java.lang.String fname
           
(package private)  int i
           
(package private)  int line
           
(package private)  org.w3c.css.sac.LexicalUnit next
           
(package private)  LexicalUnitImpl params
           
(package private)  org.w3c.css.sac.LexicalUnit prev
           
(package private)  java.lang.String s
           
(package private)  java.lang.String sdimension
           
(package private)  short type
           
 
Fields inherited from interface org.w3c.css.sac.LexicalUnit
SAC_ATTR, SAC_CENTIMETER, SAC_COUNTER_FUNCTION, SAC_COUNTERS_FUNCTION, SAC_DEGREE, SAC_DIMENSION, SAC_EM, SAC_EX, SAC_FUNCTION, SAC_GRADIAN, SAC_HERTZ, SAC_IDENT, SAC_INCH, SAC_INHERIT, SAC_INTEGER, SAC_KILOHERTZ, SAC_MILLIMETER, SAC_MILLISECOND, SAC_OPERATOR_COMMA, SAC_OPERATOR_EXP, SAC_OPERATOR_GE, SAC_OPERATOR_GT, SAC_OPERATOR_LE, SAC_OPERATOR_LT, SAC_OPERATOR_MINUS, SAC_OPERATOR_MOD, SAC_OPERATOR_MULTIPLY, SAC_OPERATOR_PLUS, SAC_OPERATOR_SLASH, SAC_OPERATOR_TILDE, SAC_PERCENTAGE, SAC_PICA, SAC_PIXEL, SAC_POINT, SAC_RADIAN, SAC_REAL, SAC_RECT_FUNCTION, SAC_RGBCOLOR, SAC_SECOND, SAC_STRING_VALUE, SAC_SUB_EXPRESSION, SAC_UNICODERANGE, SAC_URI
 
Constructor Summary
(package private) LexicalUnitImpl(int line, int column, LexicalUnitImpl previous, int i)
           
(package private) LexicalUnitImpl(int line, int column, LexicalUnitImpl previous, short type, java.lang.String s)
           
(package private) LexicalUnitImpl(int line, int column, LexicalUnitImpl previous, short dimension, java.lang.String sdimension, float f)
           
(package private) LexicalUnitImpl(short type, int line, int column, LexicalUnitImpl p)
           
(package private) LexicalUnitImpl(short type, int line, int column, LexicalUnitImpl previous, java.lang.String fname, LexicalUnitImpl params)
           
 
Method Summary
(package private) static LexicalUnitImpl createAttr(int line, int column, LexicalUnitImpl previous, java.lang.String s)
           
(package private) static LexicalUnitImpl createCM(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createComma(int line, int column, LexicalUnitImpl previous)
           
(package private) static LexicalUnitImpl createCounter(int line, int column, LexicalUnitImpl previous, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createCounters(int line, int column, LexicalUnitImpl previous, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createDEG(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createDimen(int line, int column, LexicalUnitImpl previous, float v, java.lang.String s)
           
(package private) static LexicalUnitImpl createEMS(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createEXS(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createFunction(int line, int column, LexicalUnitImpl previous, java.lang.String fname, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createGRAD(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createHZ(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createIdent(int line, int column, LexicalUnitImpl previous, java.lang.String s)
           
(package private) static LexicalUnitImpl createIN(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createInherit(int line, int column, LexicalUnitImpl previous)
           
(package private) static LexicalUnitImpl createInteger(int line, int column, LexicalUnitImpl previous, int i)
           
(package private) static LexicalUnitImpl createKHZ(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createMM(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createMS(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createNumber(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createPC(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createPercentage(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createPT(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createPX(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createRAD(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createRect(int line, int column, LexicalUnitImpl previous, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createRGBColor(int line, int column, LexicalUnitImpl previous, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createS(int line, int column, LexicalUnitImpl previous, float v)
           
(package private) static LexicalUnitImpl createSlash(int line, int column, LexicalUnitImpl previous)
           
(package private) static LexicalUnitImpl createString(int line, int column, LexicalUnitImpl previous, java.lang.String s)
           
(package private) static LexicalUnitImpl createUnicodeRange(int line, int column, org.w3c.css.sac.LexicalUnit previous, org.w3c.css.sac.LexicalUnit params)
           
(package private) static LexicalUnitImpl createURL(int line, int column, LexicalUnitImpl previous, java.lang.String s)
           
 int getColumnNumber()
           
 java.lang.String getDimensionUnitText()
          Returns the string representation of the unit.
 float getFloatValue()
          Returns the float value.
 java.lang.String getFunctionName()
          Returns the name of the function.
 int getIntegerValue()
          Returns the integer value.
 short getLexicalUnitType()
          An integer indicating the type of LexicalUnit.
 int getLineNumber()
           
 org.w3c.css.sac.LexicalUnit getNextLexicalUnit()
          Returns the next value or null if any.
 org.w3c.css.sac.LexicalUnit getParameters()
          The function parameters including operators (like the comma).
 org.w3c.css.sac.LexicalUnit getPreviousLexicalUnit()
          Returns the previous value or null if any.
 java.lang.String getStringValue()
          Returns the string value.
 org.w3c.css.sac.LexicalUnit getSubValues()
          Returns a list of values inside the sub expression.
(package private)  void setFloatValue(float f)
           
(package private)  void setIntegerValue(int i)
           
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

prev

org.w3c.css.sac.LexicalUnit prev

next

org.w3c.css.sac.LexicalUnit next

type

short type

line

int line

column

int column

i

int i

f

float f

dimension

short dimension

sdimension

java.lang.String sdimension

s

java.lang.String s

fname

java.lang.String fname

params

LexicalUnitImpl params
Constructor Detail

LexicalUnitImpl

LexicalUnitImpl(short type,
                int line,
                int column,
                LexicalUnitImpl p)

LexicalUnitImpl

LexicalUnitImpl(int line,
                int column,
                LexicalUnitImpl previous,
                int i)

LexicalUnitImpl

LexicalUnitImpl(int line,
                int column,
                LexicalUnitImpl previous,
                short dimension,
                java.lang.String sdimension,
                float f)

LexicalUnitImpl

LexicalUnitImpl(int line,
                int column,
                LexicalUnitImpl previous,
                short type,
                java.lang.String s)

LexicalUnitImpl

LexicalUnitImpl(short type,
                int line,
                int column,
                LexicalUnitImpl previous,
                java.lang.String fname,
                LexicalUnitImpl params)
Method Detail

getLineNumber

public int getLineNumber()

getColumnNumber

public int getColumnNumber()

getLexicalUnitType

public short getLexicalUnitType()
Description copied from interface: org.w3c.css.sac.LexicalUnit
An integer indicating the type of LexicalUnit.

Specified by:
getLexicalUnitType in interface org.w3c.css.sac.LexicalUnit

getNextLexicalUnit

public org.w3c.css.sac.LexicalUnit getNextLexicalUnit()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the next value or null if any.

Specified by:
getNextLexicalUnit in interface org.w3c.css.sac.LexicalUnit

getPreviousLexicalUnit

public org.w3c.css.sac.LexicalUnit getPreviousLexicalUnit()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the previous value or null if any.

Specified by:
getPreviousLexicalUnit in interface org.w3c.css.sac.LexicalUnit

getIntegerValue

public int getIntegerValue()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the integer value.

Specified by:
getIntegerValue in interface org.w3c.css.sac.LexicalUnit

setIntegerValue

void setIntegerValue(int i)

getFloatValue

public float getFloatValue()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the float value.

If the type of LexicalUnit is one of SAC_DEGREE, SAC_GRADIAN, SAC_RADIAN, SAC_MILLISECOND, SAC_SECOND, SAC_HERTZ or SAC_KILOHERTZ, the value can never be negative.

Specified by:
getFloatValue in interface org.w3c.css.sac.LexicalUnit

setFloatValue

void setFloatValue(float f)

getDimensionUnitText

public java.lang.String getDimensionUnitText()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the string representation of the unit.

if this lexical unit represents a float, the dimension is an empty string.

Specified by:
getDimensionUnitText in interface org.w3c.css.sac.LexicalUnit

getStringValue

public java.lang.String getStringValue()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the string value.

If the type is SAC_URI, the return value doesn't contain uri(....) or quotes.

If the type is SAC_ATTR, the return value doesn't contain attr(....).

Specified by:
getStringValue in interface org.w3c.css.sac.LexicalUnit

getFunctionName

public java.lang.String getFunctionName()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns the name of the function.

Specified by:
getFunctionName in interface org.w3c.css.sac.LexicalUnit

getParameters

public org.w3c.css.sac.LexicalUnit getParameters()
Description copied from interface: org.w3c.css.sac.LexicalUnit
The function parameters including operators (like the comma). #000 is converted to rgb(0, 0, 0) can return null if SAC_FUNCTION.

Specified by:
getParameters in interface org.w3c.css.sac.LexicalUnit

getSubValues

public org.w3c.css.sac.LexicalUnit getSubValues()
Description copied from interface: org.w3c.css.sac.LexicalUnit
Returns a list of values inside the sub expression.

Specified by:
getSubValues in interface org.w3c.css.sac.LexicalUnit

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).


createNumber

static LexicalUnitImpl createNumber(int line,
                                    int column,
                                    LexicalUnitImpl previous,
                                    float v)

createInteger

static LexicalUnitImpl createInteger(int line,
                                     int column,
                                     LexicalUnitImpl previous,
                                     int i)

createPercentage

static LexicalUnitImpl createPercentage(int line,
                                        int column,
                                        LexicalUnitImpl previous,
                                        float v)

createEMS

static LexicalUnitImpl createEMS(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 float v)

createEXS

static LexicalUnitImpl createEXS(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 float v)

createPX

static LexicalUnitImpl createPX(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createCM

static LexicalUnitImpl createCM(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createMM

static LexicalUnitImpl createMM(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createIN

static LexicalUnitImpl createIN(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createPT

static LexicalUnitImpl createPT(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createPC

static LexicalUnitImpl createPC(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createDEG

static LexicalUnitImpl createDEG(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 float v)

createRAD

static LexicalUnitImpl createRAD(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 float v)

createGRAD

static LexicalUnitImpl createGRAD(int line,
                                  int column,
                                  LexicalUnitImpl previous,
                                  float v)

createMS

static LexicalUnitImpl createMS(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createS

static LexicalUnitImpl createS(int line,
                               int column,
                               LexicalUnitImpl previous,
                               float v)

createHZ

static LexicalUnitImpl createHZ(int line,
                                int column,
                                LexicalUnitImpl previous,
                                float v)

createKHZ

static LexicalUnitImpl createKHZ(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 float v)

createDimen

static LexicalUnitImpl createDimen(int line,
                                   int column,
                                   LexicalUnitImpl previous,
                                   float v,
                                   java.lang.String s)

createInherit

static LexicalUnitImpl createInherit(int line,
                                     int column,
                                     LexicalUnitImpl previous)

createIdent

static LexicalUnitImpl createIdent(int line,
                                   int column,
                                   LexicalUnitImpl previous,
                                   java.lang.String s)

createString

static LexicalUnitImpl createString(int line,
                                    int column,
                                    LexicalUnitImpl previous,
                                    java.lang.String s)

createURL

static LexicalUnitImpl createURL(int line,
                                 int column,
                                 LexicalUnitImpl previous,
                                 java.lang.String s)

createAttr

static LexicalUnitImpl createAttr(int line,
                                  int column,
                                  LexicalUnitImpl previous,
                                  java.lang.String s)

createCounter

static LexicalUnitImpl createCounter(int line,
                                     int column,
                                     LexicalUnitImpl previous,
                                     org.w3c.css.sac.LexicalUnit params)

createCounters

static LexicalUnitImpl createCounters(int line,
                                      int column,
                                      LexicalUnitImpl previous,
                                      org.w3c.css.sac.LexicalUnit params)

createRGBColor

static LexicalUnitImpl createRGBColor(int line,
                                      int column,
                                      LexicalUnitImpl previous,
                                      org.w3c.css.sac.LexicalUnit params)

createRect

static LexicalUnitImpl createRect(int line,
                                  int column,
                                  LexicalUnitImpl previous,
                                  org.w3c.css.sac.LexicalUnit params)

createFunction

static LexicalUnitImpl createFunction(int line,
                                      int column,
                                      LexicalUnitImpl previous,
                                      java.lang.String fname,
                                      org.w3c.css.sac.LexicalUnit params)

createUnicodeRange

static LexicalUnitImpl createUnicodeRange(int line,
                                          int column,
                                          org.w3c.css.sac.LexicalUnit previous,
                                          org.w3c.css.sac.LexicalUnit params)

createComma

static LexicalUnitImpl createComma(int line,
                                   int column,
                                   LexicalUnitImpl previous)

createSlash

static LexicalUnitImpl createSlash(int line,
                                   int column,
                                   LexicalUnitImpl previous)