Package org.drools.drl.parser.lang.dsl
Class DefaultDSLMapping
java.lang.Object
org.drools.drl.parser.lang.dsl.DefaultDSLMapping
- All Implemented Interfaces:
DSLMapping
This is a default implementation of the DSL Mapping interface
capable of storing a list of DSLMappingEntries and managing it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntries(List<DSLMappingEntry> entries) Adds all entries in the given list to this DSL MappingvoidaddEntry(DSLMappingEntry entry) Add one entry to the list of the entriesReturns a String description of this mappingReturns an unmodifiable list of entriesgetEntries(DSLMappingEntry.Section section) Returns the list of mappings for the given sectionReturns the identifier for this mappingbooleanRetrieves an an expansion option.voidremoveEntry(DSLMappingEntry entry) Removes the given entry from the list of entriesvoidsetDescription(String description) Sets the description for this mappingvoidsetIdentifier(String identifier) Sets the identifier for this mappingvoidsetOptions(Collection<String> option) Sets an expansion option.
-
Constructor Details
-
DefaultDSLMapping
public DefaultDSLMapping() -
DefaultDSLMapping
-
-
Method Details
-
addEntry
Add one entry to the list of the entries- Specified by:
addEntryin interfaceDSLMapping- Parameters:
entry-
-
addEntries
Adds all entries in the given list to this DSL Mapping- Specified by:
addEntriesin interfaceDSLMapping- Parameters:
entries-
-
getEntries
Returns an unmodifiable list of entries- Specified by:
getEntriesin interfaceDSLMapping- Returns:
-
getEntries
Returns the list of mappings for the given section- Specified by:
getEntriesin interfaceDSLMapping- Parameters:
section-- Returns:
-
getIdentifier
Returns the identifier for this mapping- Specified by:
getIdentifierin interfaceDSLMapping- Returns:
-
removeEntry
Description copied from interface:DSLMappingRemoves the given entry from the list of entries- Specified by:
removeEntryin interfaceDSLMapping
-
getDescription
Description copied from interface:DSLMappingReturns a String description of this mapping- Specified by:
getDescriptionin interfaceDSLMapping- Returns:
-
setDescription
Description copied from interface:DSLMappingSets the description for this mapping- Specified by:
setDescriptionin interfaceDSLMapping
-
setIdentifier
Description copied from interface:DSLMappingSets the identifier for this mapping- Specified by:
setIdentifierin interfaceDSLMapping
-
setOptions
Description copied from interface:DSLMappingSets an expansion option.- Specified by:
setOptionsin interfaceDSLMapping
-
getOption
Description copied from interface:DSLMappingRetrieves an an expansion option.- Specified by:
getOptionin interfaceDSLMapping- Returns:
- true if option is set.
-