private static final class CaseFormat.StringConverter extends Converter<java.lang.String,java.lang.String> implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
private static long |
serialVersionUID |
private CaseFormat |
sourceFormat |
private CaseFormat |
targetFormat |
| Constructor and Description |
|---|
StringConverter(CaseFormat sourceFormat,
CaseFormat targetFormat) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.String |
doBackward(java.lang.String s)
Returns a representation of
b as an instance of type A. |
protected java.lang.String |
doForward(java.lang.String s)
Returns a representation of
a as an instance of type B. |
boolean |
equals(java.lang.Object object)
Indicates whether another object is equal to this converter.
|
int |
hashCode() |
java.lang.String |
toString() |
andThen, apply, convert, convertAll, correctedDoBackward, correctedDoForward, doAndThen, from, identity, reverseprivate final CaseFormat sourceFormat
private final CaseFormat targetFormat
private static final long serialVersionUID
StringConverter(CaseFormat sourceFormat, CaseFormat targetFormat)
protected java.lang.String doForward(java.lang.String s)
Convertera as an instance of type B. If a cannot be
converted, an unchecked exception (such as IllegalArgumentException) should be thrown.protected java.lang.String doBackward(java.lang.String s)
Converterb as an instance of type A. If b cannot be
converted, an unchecked exception (such as IllegalArgumentException) should be thrown.doBackward in class Converter<java.lang.String,java.lang.String>s - the instance to convert; will never be nullpublic boolean equals(java.lang.Object object)
ConverterMost implementations will have no reason to override the behavior of Object.equals(java.lang.Object).
However, an implementation may also choose to return true whenever object is a
Converter that it considers interchangeable with this one. "Interchangeable"
typically means that Objects.equal(this.convert(a), that.convert(a)) is true for
all a of type A (and similarly for reverse). Note that a false
result from this method does not imply that the converters are known not to be
interchangeable.
public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object