Class AbstractEvent
- java.lang.Object
-
- 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
Constructors Constructor Description AbstractEvent()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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
-
-
-
-
Method Detail
-
isComment
public boolean isComment()
Description copied from interface:DSCEvent
Indicates whether the instance is a PostScript comment.- Specified by:
isComment
in interfaceDSCEvent
- 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 interfaceDSCEvent
- 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 interfaceDSCEvent
- 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 interfaceDSCEvent
- 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 interfaceDSCEvent
- 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 interfaceDSCEvent
- Returns:
- this event as a PostScriptLine
- See Also:
DSCEvent.asLine()
-
-