Package org.docx4j.toc.switches
Class AbstractSwitch
java.lang.Object
org.docx4j.toc.switches.AbstractSwitch
- All Implemented Interfaces:
SwitchInterface
- Direct Known Subclasses:
FormattingSwitch,SelectorSwitch
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintintbooleanparseFieldArgument(String fieldArgument) Default implementation doesn't need to parse at all.protected StringprepareArgument(String fieldArgument) Rules applied: 1.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.docx4j.toc.switches.SwitchInterface
getPriority, hasFieldArgument, process
-
Field Details
-
EMPTY
- See Also:
-
ERROR_NOT_VALID_HEADING_LEVEL
- See Also:
-
-
Constructor Details
-
AbstractSwitch
public AbstractSwitch()
-
-
Method Details
-
parseFieldArgument
Default implementation doesn't need to parse at all.- Specified by:
parseFieldArgumentin interfaceSwitchInterface- Parameters:
fieldArgument- .- Returns:
- error string if any for exception
-
isSelectorSwitch
public boolean isSelectorSwitch() -
getStartLevel
public int getStartLevel() -
getEndLevel
public int getEndLevel() -
getStyleLevelMap
-
prepareArgument
Rules applied: 1. if argument has quote and this quote is not the beginning of string - return empty 2. if argument starts with quote but has no ending quote - return empty- Parameters:
fieldArgument-- Returns:
- empty string in case field argument can not be parsed correctly
-