Class DefaultExpressionEngineSymbols
- java.lang.Object
-
- org.apache.commons.configuration2.tree.DefaultExpressionEngineSymbols
-
public final class DefaultExpressionEngineSymbols extends java.lang.Object
A class representing the various symbols that are supported in keys recognized by
DefaultExpressionEngine
.An instance of this class is associated with each instance of
DefaultExpressionEngine
. It determines which concrete symbols are used to define elements like separators, attributes, etc. within a configuration key.Instances are created using the nested
Builder
class. They are immutable and can be shared between arbitrary components.- Since:
- 2.0
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultExpressionEngineSymbols.Builder
A builder class for creating instances ofDefaultExpressionEngineSymbols
.
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
attributeEnd
Stores the attribute end marker.private java.lang.String
attributeStart
Stores the attribute start marker.static java.lang.String
DEFAULT_ATTRIBUTE_END
Constant for the default attribute end marker.static java.lang.String
DEFAULT_ATTRIBUTE_START
Constant for the default attribute start marker.static java.lang.String
DEFAULT_ESCAPED_DELIMITER
Constant for the default escaped property delimiter.static java.lang.String
DEFAULT_INDEX_END
Constant for the default index end marker.static java.lang.String
DEFAULT_INDEX_START
Constant for the default index start marker.static java.lang.String
DEFAULT_PROPERTY_DELIMITER
Constant for the default property delimiter.static DefaultExpressionEngineSymbols
DEFAULT_SYMBOLS
An instance with default symbols.private java.lang.String
escapedDelimiter
Stores the escaped property delimiter.private java.lang.String
indexEnd
Stores the index end marker.private java.lang.String
indexStart
Stores the index start marker.private java.lang.String
propertyDelimiter
Stores the property delimiter.
-
Constructor Summary
Constructors Modifier Constructor Description private
DefaultExpressionEngineSymbols(DefaultExpressionEngineSymbols.Builder b)
Creates a new instance ofDefaultExpressionEngineSymbols
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static DefaultExpressionEngineSymbols
createDefaultSmybols()
Creates theDefaultExpressionEngineSymbols
object with default symbols.boolean
equals(java.lang.Object obj)
Compares this object with another one.java.lang.String
getAttributeEnd()
Gets the string representing an attribute end marker.java.lang.String
getAttributeStart()
Gets the string representing an attribute start marker.java.lang.String
getEscapedDelimiter()
Gets the string representing an escaped property delimiter.java.lang.String
getIndexEnd()
Gets the string representing the end of an index in a property key.java.lang.String
getIndexStart()
Gets the string representing the start of an index in a property key.java.lang.String
getPropertyDelimiter()
Gets the string used as delimiter in property keys.int
hashCode()
Returns a hash code for this object.java.lang.String
toString()
Returns a string representation for this object.
-
-
-
Field Detail
-
DEFAULT_PROPERTY_DELIMITER
public static final java.lang.String DEFAULT_PROPERTY_DELIMITER
Constant for the default property delimiter.- See Also:
- Constant Field Values
-
DEFAULT_ESCAPED_DELIMITER
public static final java.lang.String DEFAULT_ESCAPED_DELIMITER
Constant for the default escaped property delimiter.- See Also:
- Constant Field Values
-
DEFAULT_ATTRIBUTE_START
public static final java.lang.String DEFAULT_ATTRIBUTE_START
Constant for the default attribute start marker.- See Also:
- Constant Field Values
-
DEFAULT_ATTRIBUTE_END
public static final java.lang.String DEFAULT_ATTRIBUTE_END
Constant for the default attribute end marker.- See Also:
- Constant Field Values
-
DEFAULT_INDEX_START
public static final java.lang.String DEFAULT_INDEX_START
Constant for the default index start marker.- See Also:
- Constant Field Values
-
DEFAULT_INDEX_END
public static final java.lang.String DEFAULT_INDEX_END
Constant for the default index end marker.- See Also:
- Constant Field Values
-
DEFAULT_SYMBOLS
public static final DefaultExpressionEngineSymbols DEFAULT_SYMBOLS
An instance with default symbols. This instance is used by the default instance ofDefaultExpressionEngine
.
-
propertyDelimiter
private final java.lang.String propertyDelimiter
Stores the property delimiter.
-
escapedDelimiter
private final java.lang.String escapedDelimiter
Stores the escaped property delimiter.
-
attributeStart
private final java.lang.String attributeStart
Stores the attribute start marker.
-
attributeEnd
private final java.lang.String attributeEnd
Stores the attribute end marker.
-
indexStart
private final java.lang.String indexStart
Stores the index start marker.
-
indexEnd
private final java.lang.String indexEnd
Stores the index end marker.
-
-
Constructor Detail
-
DefaultExpressionEngineSymbols
private DefaultExpressionEngineSymbols(DefaultExpressionEngineSymbols.Builder b)
Creates a new instance ofDefaultExpressionEngineSymbols
.- Parameters:
b
- the builder for defining the properties of this instance
-
-
Method Detail
-
createDefaultSmybols
private static DefaultExpressionEngineSymbols createDefaultSmybols()
Creates theDefaultExpressionEngineSymbols
object with default symbols.- Returns:
- the default symbols instance
-
equals
public boolean equals(java.lang.Object obj)
Compares this object with another one. Two instances ofDefaultExpressionEngineSymbols
are considered equal if all of their properties are equal.- Overrides:
equals
in classjava.lang.Object
- Parameters:
obj
- the object to compare to- Returns:
- a flag whether these objects are equal
-
getAttributeEnd
public java.lang.String getAttributeEnd()
Gets the string representing an attribute end marker.- Returns:
- the attribute end marker
-
getAttributeStart
public java.lang.String getAttributeStart()
Gets the string representing an attribute start marker.- Returns:
- the attribute start marker
-
getEscapedDelimiter
public java.lang.String getEscapedDelimiter()
Gets the string representing an escaped property delimiter.- Returns:
- the escaped property delimiter
-
getIndexEnd
public java.lang.String getIndexEnd()
Gets the string representing the end of an index in a property key.- Returns:
- the index end marker
-
getIndexStart
public java.lang.String getIndexStart()
Gets the string representing the start of an index in a property key.- Returns:
- the index start marker
-
getPropertyDelimiter
public java.lang.String getPropertyDelimiter()
Gets the string used as delimiter in property keys.- Returns:
- the property delimiter
-
hashCode
public int hashCode()
Returns a hash code for this object.- Overrides:
hashCode
in classjava.lang.Object
- Returns:
- a hash code
-
toString
public java.lang.String toString()
Returns a string representation for this object. This string contains the values of all properties.- Overrides:
toString
in classjava.lang.Object
- Returns:
- a string for this object
-
-