Package org.daisy.paper
Class AbstractPaper
java.lang.Object
org.daisy.factory.AbstractFactory
org.daisy.paper.AbstractPaper
- All Implemented Interfaces:
Serializable
,Comparable<Factory>
,Factory
,Paper
- Direct Known Subclasses:
RollPaper
,SheetPaper
,TractorPaper
Provides a default implementation for Paper.
- Author:
- Joel HÃ¥kansson
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.daisy.paper.Paper
Paper.Type
-
Constructor Summary
ConstructorDescriptionAbstractPaper
(String name, String desc, Enum<? extends Enum<?>> identifier) Creates a new paper.AbstractPaper
(String name, String desc, String identifier) Creates a new paper. -
Method Summary
Modifier and TypeMethodDescriptionReturns this Paper as a RollPaperReturns this Paper as a SheetPaperReturns this Paper as a TractorPapergetFeature
(String key) Gets the value of a feature used by this FactorygetProperty
(String key) Gets the value of a read-only property that applies to all objects returned by this Factory.void
setFeature
(String key, Object value) Sets a feature for new Objects returned by this FactoryMethods inherited from class org.daisy.factory.AbstractFactory
compareTo, getDescription, getDisplayName, getIdentifier, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface org.daisy.factory.Factory
getDescription, getDisplayName, getIdentifier
-
Constructor Details
-
AbstractPaper
Creates a new paper.- Parameters:
name
- the name of the paperdesc
- the description of the paperidentifier
- the identifier
-
AbstractPaper
Creates a new paper.- Parameters:
name
- the name of the paperdesc
- the description of the paperidentifier
- the identifier
-
-
Method Details
-
getFeature
Description copied from interface:Factory
Gets the value of a feature used by this Factory- Specified by:
getFeature
in interfaceFactory
- Parameters:
key
- the key for the feature- Returns:
- returns the current value of the feature
-
getProperty
Description copied from interface:Factory
Gets the value of a read-only property that applies to all objects returned by this Factory.- Specified by:
getProperty
in interfaceFactory
- Parameters:
key
- the name of the property to get- Returns:
- returns the value associated with this property or null if none is found
-
setFeature
Description copied from interface:Factory
Sets a feature for new Objects returned by this Factory- Specified by:
setFeature
in interfaceFactory
- Parameters:
key
- the key for the featurevalue
- the value of the feature
-
asSheetPaper
Description copied from interface:Paper
Returns this Paper as a SheetPaper- Specified by:
asSheetPaper
in interfacePaper
- Returns:
- returns the SheetPaper
-
asTractorPaper
Description copied from interface:Paper
Returns this Paper as a TractorPaper- Specified by:
asTractorPaper
in interfacePaper
- Returns:
- returns the TractorPaper
-
asRollPaper
Description copied from interface:Paper
Returns this Paper as a RollPaper- Specified by:
asRollPaper
in interfacePaper
- Returns:
- returns the RollPaper
-