public abstract class StringBasedErpType<T extends StringBasedErpType<T>> extends Object implements ErpType<T>, Comparable<T>, StringRepresentableKey
Modifier and Type | Class and Description |
---|---|
static class |
StringBasedErpType.CharCasing |
static class |
StringBasedErpType.FillCharStrategy |
Constructor and Description |
---|
StringBasedErpType(String value)
Constructs a new string-based type.
|
StringBasedErpType(String value,
StringBasedErpType.CharCasing charCasing)
Constructs a new string-based type with a certain character casing.
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(T other) |
boolean |
equals(Object o) |
char |
getFillChar() |
abstract StringBasedErpType.FillCharStrategy |
getFillCharStrategy() |
String |
getKeyAsString() |
abstract int |
getMaxLength() |
abstract Class<T> |
getType() |
String |
getValue() |
int |
hashCode() |
boolean |
isDefault() |
boolean |
isEmpty() |
String |
toString() |
String |
toString(StringBasedErpType.FillCharStrategy strategy,
char fillChar) |
static <T extends StringBasedErpType<T>> |
transformToString(ErpTypeConverter<T> converter) |
static <T extends StringBasedErpType<T>> |
transformToType(ErpTypeConverter<T> converter) |
getTypeConverter
public StringBasedErpType(String value) throws IllegalArgumentException
value
- The value of the type (not null
). The given string is trimmed. An empty or trimmed empty value
results in an empty instance of the string-based type.IllegalArgumentException
- If the given value cannot be converted to an instance of this type.public StringBasedErpType(String value, StringBasedErpType.CharCasing charCasing) throws IllegalArgumentException
value
- The value of the type (not null
). The given string is trimmed. An empty or trimmed empty value
results in an empty instance of the string-based type.charCasing
- Defines the casing of characters within the string.IllegalArgumentException
- If the given value cannot be converted to an instance of this type.public abstract int getMaxLength()
public abstract StringBasedErpType.FillCharStrategy getFillCharStrategy()
public char getFillChar()
public final boolean isEmpty()
true
if the contained string value is empty, false
otherwise.public final boolean isDefault()
true
if this instance represents the default SapClient.DEFAULT
, false
otherwise.public final String toString(StringBasedErpType.FillCharStrategy strategy, char fillChar)
public int compareTo(T other)
compareTo
in interface Comparable<T extends StringBasedErpType<T>>
public String getKeyAsString()
getKeyAsString
in interface StringRepresentableKey
public static <T extends StringBasedErpType<T>> com.google.common.base.Function<T,String> transformToString(ErpTypeConverter<T> converter)
public static <T extends StringBasedErpType<T>> com.google.common.base.Function<String,T> transformToType(ErpTypeConverter<T> converter)
@Generated(value="lombok") public boolean equals(Object o)
@Generated(value="lombok") public int hashCode()
@Generated(value="lombok") public String getValue()
Copyright © 2017 SAP SE. All rights reserved.