class RuleFactory extends RuleSymbols with Serializable
Regular Expressions rule manager. Applies rules based on Matching and Replacement strategies
- Alphabetic
- By Inheritance
- RuleFactory
- Serializable
- Serializable
- RuleSymbols
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
RuleFactory(matchStrategy: Format, transformStrategy: TransformStrategy = TransformStrategy.NO_TRANSFORM)
- matchStrategy
How to decide on regex search
- transformStrategy
How to decide when replacing or transforming content with Regex
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
val
BREAK_INDICATOR: String
Separation symbols for list items and numbers
Separation symbols for list items and numbers
- Definition Classes
- RuleSymbols
-
val
COMMA: String
looks up ,
looks up ,
- Definition Classes
- RuleSymbols
-
val
DOT: String
looks up .
looks up .
- Definition Classes
- RuleSymbols
-
val
EXCLAMATION: String
looks up !
looks up !
- Definition Classes
- RuleSymbols
-
val
PROTECTION_MARKER_CLOSE: String
- Definition Classes
- RuleSymbols
-
val
PROTECTION_MARKER_OPEN: String
Between punctuations marker
Between punctuations marker
- Definition Classes
- RuleSymbols
-
val
QUESTION: String
looks up ?
looks up ?
- Definition Classes
- RuleSymbols
-
val
SEMICOLON: String
looks up ;
looks up ;
- Definition Classes
- RuleSymbols
-
val
UNPROTECTED_BREAK_INDICATOR: String
Magic regex ensures no breaking within protection
Magic regex ensures no breaking within protection
- Definition Classes
- RuleSymbols
-
def
addRule(rule: Regex, description: String): RuleFactory.this.type
Adds a rule to this factory with native types
-
def
addRule(rule: RegexRule): RuleFactory.this.type
Adds a rule to this factory
-
def
addRules(newRules: Seq[RegexRule]): RuleFactory.this.type
add multiple rules alltogether
-
def
addSymbolicRule(symbol: String, rule: RegexRule): RuleFactory.this.type
Adds a rule and its associated symbol to apply some transformation using such symbol
Adds a rule and its associated symbol to apply some transformation using such symbol
- symbol
symbol is a character to be used in a transformation application, where many rules can apply different transformations
- rule
rule to be used when replacing a match with a symbol
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clearRules(): RuleFactory.this.type
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
findMatch(text: String): Seq[RuleMatch]
Applies factory match strategy to find matches and returns any number of Matches
-
def
findMatchFirstOnly(text: String): Option[RuleMatch]
Specifically finds a first match within a group of matches
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
setRules(newRules: Seq[RegexRule]): RuleFactory.this.type
overrides rules with a new set of rules
-
def
symbolRecovery: Map[String, String]
- Definition Classes
- RuleSymbols
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
def
transformWithSymbol(symbol: String, text: String): String
Applies factory transform of all ordered rules utilizing transform and match strategies with provided symbol
Applies factory transform of all ordered rules utilizing transform and match strategies with provided symbol
- symbol
a symbol to use for all transformations altogether
- text
target text to transform
-
def
transformWithSymbolicRules(text: String): String
Applies factory transform of all ordered rules utilizing transform and match strategies corresponding each rule with its symbol
Applies factory transform of all ordered rules utilizing transform and match strategies corresponding each rule with its symbol
- text
target text to transform
- returns
Returns a transformed text
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native()