Package gamedata
Class ConversionMap.Conversion
- java.lang.Object
-
- gamedata.ConversionMap.Entry
-
- gamedata.ConversionMap.NamedEntry
-
- gamedata.ConversionMap.Conversion
-
- Enclosing class:
- ConversionMap
public static final class ConversionMap.Conversion extends ConversionMap.NamedEntry
Represents a conversion option in a conversion map file
-
-
Constructor Summary
Constructors Constructor Description Conversion(java.lang.String name, ConversionMap.Class sourceClassName, java.lang.String targetClassName, java.lang.String requiredExtension, ConversionMap.Group group)
Creates a new conversion option.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ManualConversionTrigger
createManualConversionTrigger()
Creates a manual conversion trigger based on this conversion option.ConversionMap.Group
getGroup()
Returns the conversion group this conversion option belongs to.java.lang.String
getRequiredExtension()
Returns the identifier of the required extension for the target component type.java.lang.String
getSourceClassName()
Returns the class name of the source component type.java.lang.String
getTargetClassName()
Returns the class name of the target component type.boolean
hasRequiredExtension()
Checks if the required extension is installed.-
Methods inherited from class gamedata.ConversionMap.NamedEntry
getName, setName
-
Methods inherited from class gamedata.ConversionMap.Entry
equals, getId, hashCode
-
-
-
-
Constructor Detail
-
Conversion
public Conversion(java.lang.String name, ConversionMap.Class sourceClassName, java.lang.String targetClassName, java.lang.String requiredExtension, ConversionMap.Group group)
Creates a new conversion option.- Parameters:
name
- the name of the conversion optionsourceClassName
- the source class name entry, ornull
if this is a group conversion optiontargetClassName
- the target class namerequiredExtension
- the identifier of the required extension, ornull
if the target belongs to the same extensiongroup
- the group entry, ornull
if this is a direct conversion option
-
-
Method Detail
-
getSourceClassName
public java.lang.String getSourceClassName()
Returns the class name of the source component type. Returnsnull
if this is a group conversion option.- Returns:
- the source class name
-
getTargetClassName
public java.lang.String getTargetClassName()
Returns the class name of the target component type.- Returns:
- the target class name
-
getRequiredExtension
public java.lang.String getRequiredExtension()
Returns the identifier of the required extension for the target component type. Returnsnull
if it belongs to the same extension as the source component type.- Returns:
- the required extension identifier
-
getGroup
public ConversionMap.Group getGroup()
Returns the conversion group this conversion option belongs to. Returnsnull
if this is a direct conversion option.- Returns:
- the conversion group
-
hasRequiredExtension
public boolean hasRequiredExtension()
Checks if the required extension is installed.- Returns:
- whether the required extension is installed or not
-
createManualConversionTrigger
public ManualConversionTrigger createManualConversionTrigger()
Creates a manual conversion trigger based on this conversion option.- Returns:
- a manual conversion trigger
-
-