Enum BashQuoteType
- java.lang.Object
-
- java.lang.Enum<BashQuoteType>
-
- com.g2forge.alexandria.java.text.quote.BashQuoteType
-
- All Implemented Interfaces:
IEnumQuoteType<BashQuoteType>
,IQuoteType
,Serializable
,Comparable<BashQuoteType>
public enum BashQuoteType extends Enum<BashQuoteType> implements IEnumQuoteType<BashQuoteType>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BashDoubleExpand
BashDoubleNoExpand
BashSingle
-
Field Summary
Fields Modifier and Type Field Description protected IEscapeType
escapeType
protected static String
FORCE_QUOTE
protected static String
OPCHARACTERS
protected String
prefix
protected static String
WHITESPACE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description IEscapeType
getEscapeType()
String
getPostfix()
The postfix to use when quoting a string.String
getPrefix()
The prefix to use when quoting a string.boolean
isQuoteNeeded(CharSequence string)
static BashQuoteType
valueOf(String name)
Returns the enum constant of this type with the specified name.static BashQuoteType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.-
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Methods inherited from interface com.g2forge.alexandria.java.text.quote.IEnumQuoteType
isQuotedAny, quoteAny, unquoteAny
-
-
-
-
Enum Constant Detail
-
BashSingle
public static final BashQuoteType BashSingle
-
BashDoubleExpand
public static final BashQuoteType BashDoubleExpand
-
BashDoubleNoExpand
public static final BashQuoteType BashDoubleNoExpand
-
-
Field Detail
-
OPCHARACTERS
protected static final String OPCHARACTERS
- See Also:
- Constant Field Values
-
WHITESPACE
protected static final String WHITESPACE
- See Also:
- Constant Field Values
-
FORCE_QUOTE
protected static final String FORCE_QUOTE
- See Also:
- Constant Field Values
-
prefix
protected final String prefix
-
escapeType
protected final IEscapeType escapeType
-
-
Method Detail
-
values
public static BashQuoteType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (BashQuoteType c : BashQuoteType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static BashQuoteType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
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.
-
isQuoteNeeded
public boolean isQuoteNeeded(CharSequence string)
- Specified by:
isQuoteNeeded
in interfaceIQuoteType
-
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.
-
getEscapeType
public IEscapeType getEscapeType()
- Specified by:
getEscapeType
in interfaceIQuoteType
-
-