Class RegexQuoteType
- java.lang.Object
-
- com.g2forge.alexandria.java.text.quote.RegexQuoteType
-
- All Implemented Interfaces:
IQuoteType
,IRegexQuoteType
public class RegexQuoteType extends Object implements IRegexQuoteType
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
RegexQuoteType.RegexQuoteTypeBuilder
-
Field Summary
Fields Modifier and Type Field Description protected String
escapesRegex
protected IEscapeType
escapeType
protected String
postfix
protected String
prefix
protected String
quoteRegex
-
Constructor Summary
Constructors Constructor Description RegexQuoteType(String prefix, String escapesRegex, String quoteRegex, String postfix, IEscapeType escapeType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegexQuoteType.RegexQuoteTypeBuilder
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
String
getEscapesRegex()
IEscapeType
getEscapeType()
String
getPostfix()
The postfix to use when quoting a string.String
getPrefix()
The prefix to use when quoting a string.String
getQuoteRegex()
Get the regex pattern for character sequences whose presence indicate that a string must be quoted.int
hashCode()
RegexQuoteType.RegexQuoteTypeBuilder
toBuilder()
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.g2forge.alexandria.java.text.quote.IQuoteType
escape, isQuoted, quote, unescape, unquote
-
Methods inherited from interface com.g2forge.alexandria.java.text.quote.IRegexQuoteType
isQuoteNeeded
-
-
-
-
Field Detail
-
prefix
protected final String prefix
-
escapesRegex
protected final String escapesRegex
-
quoteRegex
protected final String quoteRegex
-
postfix
protected final String postfix
-
escapeType
protected final IEscapeType escapeType
-
-
Constructor Detail
-
RegexQuoteType
@ConstructorProperties({"prefix","escapesRegex","quoteRegex","postfix","escapeType"}) public RegexQuoteType(String prefix, String escapesRegex, String quoteRegex, String postfix, IEscapeType escapeType)
-
-
Method Detail
-
builder
public static RegexQuoteType.RegexQuoteTypeBuilder builder()
-
toBuilder
public RegexQuoteType.RegexQuoteTypeBuilder toBuilder()
-
getPrefix
public String getPrefix()
Description copied from interface:IQuoteType
The prefix to use when quoting a string. For example this may be a single double quote character.- Specified by:
getPrefix
in interfaceIQuoteType
- Returns:
- the prefix to use when quoting a string.
-
getEscapesRegex
public String getEscapesRegex()
-
getQuoteRegex
public String getQuoteRegex()
Description copied from interface:IRegexQuoteType
Get the regex pattern for character sequences whose presence indicate that a string must be quoted.- Specified by:
getQuoteRegex
in interfaceIRegexQuoteType
- Returns:
- A regex pattern to determine whether a string must be quoted.
-
getPostfix
public String getPostfix()
Description copied from interface:IQuoteType
The postfix to use when quoting a string. For example this may be a single double quote character.- Specified by:
getPostfix
in interfaceIQuoteType
- Returns:
- the postfix to use when quoting a string.
-
getEscapeType
public IEscapeType getEscapeType()
- Specified by:
getEscapeType
in interfaceIQuoteType
-
canEqual
protected boolean canEqual(Object other)
-
-