xmlgraphics-commons 1.4

org.apache.xmlgraphics.ps.dsc.events
Class AbstractEvent

java.lang.Object
  extended by org.apache.xmlgraphics.ps.dsc.events.AbstractEvent
All Implemented Interfaces:
DSCParserConstants, DSCEvent
Direct Known Subclasses:
AbstractDSCComment, DSCHeaderComment, PostScriptComment, PostScriptLine, UnparsedDSCComment

public abstract class AbstractEvent
extends java.lang.Object
implements DSCEvent

Abstract base class for DSC events.


Field Summary
 
Fields inherited from interface org.apache.xmlgraphics.ps.dsc.DSCParserConstants
COMMENT, DSC_COMMENT, EOF, HEADER_COMMENT, LINE
 
Constructor Summary
AbstractEvent()
           
 
Method Summary
 DSCComment asDSCComment()
          Casts this instance to a DSCComment if possible.
 PostScriptLine asLine()
          Casts this instance to a PostScriptLine if possible.
 boolean isComment()
          Indicates whether the instance is a PostScript comment.
 boolean isDSCComment()
          Indicates whether the instance is a DSC comment.
 boolean isHeaderComment()
          Indicates whether the instance is a header comment.
 boolean isLine()
          Indicates whether the instance is a PostScript line.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.xmlgraphics.ps.dsc.events.DSCEvent
generate, getEventType
 

Constructor Detail

AbstractEvent

public AbstractEvent()
Method Detail

isComment

public boolean isComment()
Description copied from interface: DSCEvent
Indicates whether the instance is a PostScript comment.

Specified by:
isComment in interface DSCEvent
Returns:
true if the instance is a PostScript comment
See Also:
DSCEvent.isComment()

isDSCComment

public boolean isDSCComment()
Description copied from interface: DSCEvent
Indicates whether the instance is a DSC comment.

Specified by:
isDSCComment in interface DSCEvent
Returns:
true if the instance is a DSC comment
See Also:
DSCEvent.isDSCComment()

isHeaderComment

public boolean isHeaderComment()
Description copied from interface: DSCEvent
Indicates whether the instance is a header comment.

Specified by:
isHeaderComment in interface DSCEvent
Returns:
true if the instance is a header comment
See Also:
DSCEvent.isHeaderComment()

isLine

public boolean isLine()
Description copied from interface: DSCEvent
Indicates whether the instance is a PostScript line.

Specified by:
isLine in interface DSCEvent
Returns:
true if the instance is a PostScript line
See Also:
DSCEvent.isLine()

asDSCComment

public DSCComment asDSCComment()
Description copied from interface: DSCEvent
Casts this instance to a DSCComment if possible.

Specified by:
asDSCComment in interface DSCEvent
Returns:
this event as a DSCComment
See Also:
DSCEvent.asDSCComment()

asLine

public PostScriptLine asLine()
Description copied from interface: DSCEvent
Casts this instance to a PostScriptLine if possible.

Specified by:
asLine in interface DSCEvent
Returns:
this event as a PostScriptLine
See Also:
DSCEvent.asLine()

xmlgraphics-commons 1.4

Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.