@FunctionalInterface public interface IGetterDirectTrait
| Modifier and Type | Method and Description |
|---|---|
default BigDecimal |
getAsBigDecimal() |
default BigDecimal |
getAsBigDecimal(BigDecimal aDefault) |
default BigInteger |
getAsBigInteger() |
default BigInteger |
getAsBigInteger(BigInteger aDefault) |
default boolean |
getAsBoolean() |
default boolean |
getAsBoolean(boolean bDefault) |
default Boolean |
getAsBooleanObj() |
default byte |
getAsByte() |
default byte |
getAsByte(byte nDefault) |
default byte[] |
getAsByteArray() |
default Byte |
getAsByteObj() |
default char |
getAsChar() |
default char |
getAsChar(char cDefault) |
default char[] |
getAsCharArray() |
default char[] |
getAsCharArray(char[] aDefault) |
default Character |
getAsCharObj() |
default double |
getAsDouble() |
default double |
getAsDouble(double dDefault) |
default Double |
getAsDoubleObj() |
default float |
getAsFloat() |
default float |
getAsFloat(float fDefault) |
default Float |
getAsFloatObj() |
default int |
getAsInt() |
default int |
getAsInt(int nDefault) |
default Integer |
getAsIntObj() |
default LocalDate |
getAsLocalDate() |
default LocalDate |
getAsLocalDate(LocalDate aDefault) |
default LocalDateTime |
getAsLocalDateTime() |
default LocalDateTime |
getAsLocalDateTime(LocalDateTime aDefault) |
default LocalTime |
getAsLocalTime() |
default LocalTime |
getAsLocalTime(LocalTime aDefault) |
default long |
getAsLong() |
default long |
getAsLong(long nDefault) |
default Long |
getAsLongObj() |
default short |
getAsShort() |
default short |
getAsShort(short nDefault) |
default Short |
getAsShortObj() |
default Blob |
getAsSqlBlob() |
default Clob |
getAsSqlClob() |
default Date |
getAsSqlDate() |
default NClob |
getAsSqlNClob() |
default RowId |
getAsSqlRowId() |
default Time |
getAsSqlTime() |
default Timestamp |
getAsSqlTimestamp() |
default String |
getAsString() |
default String |
getAsString(String sDefault) |
default <T> T |
getCastedValue()
Get the contained value casted to the return type.
|
default <T> T |
getCastedValue(Class<T> aClass)
Get the contained value casted to the specified class.
|
default <T> T |
getCastedValue(T aDefault)
Get the contained value casted to the return type.
|
default <T> T |
getCastedValue(T aDefault,
Class<T> aClass)
Get the contained value casted to the specified class.
|
default <T> T |
getConvertedValue(Class<T> aClass)
Get the contained value converted using TypeConverter to the passed class.
|
default <T> T |
getConvertedValue(T aDefault,
Class<T> aClass)
Get the contained value converted using TypeConverter to the passed class.
|
Object |
getValue() |
default Class<?> |
getValueClass() |
default boolean |
hasNoValue() |
default boolean |
hasValue() |
@Nullable Object getValue()
null constraints applicable.@Nullable default Class<?> getValueClass()
null if no value is
contained.default boolean hasValue()
true if the value is not null. Same as
getValue()!=null.default boolean hasNoValue()
true if the value is null. Same as
getValue()==null.@Nullable default <T> T getCastedValue()
T - Destination typenull if the contained value is null.ClassCastException - in case the value types are not convertible@Nullable default <T> T getCastedValue(@Nullable T aDefault)
T - Destination typeaDefault - The value to be returned if the retrieved value is null
.null if the contained value is null.ClassCastException - in case the value types are not convertible@Nullable default <T> T getCastedValue(@Nonnull Class<T> aClass)
T - Destination typeaClass - The class to cast to.null if the contained value is null.ClassCastException - in case the value types are not convertible@Nullable default <T> T getCastedValue(@Nullable T aDefault, @Nonnull Class<T> aClass)
T - Destination typeaDefault - The value to be returned if the retrieved value is null
.aClass - The class to cast to.null if the contained value is null.ClassCastException - in case the value types are not convertible@Nullable default <T> T getConvertedValue(@Nonnull Class<T> aClass)
T - Destination typeaClass - The class to convert to.null if the contained value is null.TypeConverterException - in case of an error@Nullable default <T> T getConvertedValue(@Nullable T aDefault, @Nonnull Class<T> aClass)
T - Destination typeaDefault - The value to be returned if the retrieved value is null
.aClass - The class to convert to.null if the contained value is null.TypeConverterException - in case of an errordefault boolean getAsBoolean()
default boolean getAsBoolean(boolean bDefault)
default byte getAsByte()
default byte getAsByte(byte nDefault)
default char getAsChar()
default char getAsChar(char cDefault)
default double getAsDouble()
default double getAsDouble(double dDefault)
default float getAsFloat()
default float getAsFloat(float fDefault)
default int getAsInt()
default int getAsInt(int nDefault)
default long getAsLong()
default long getAsLong(long nDefault)
default short getAsShort()
default short getAsShort(short nDefault)
@Nullable default String getAsString()
getConvertedValue (String.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default String getAsString(@Nullable String sDefault)
sDefault - The value to be returned if the retrieved value is null
.getConvertedValue (sDefault, String.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default char[] getAsCharArray()
getConvertedValue (char[].class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default char[] getAsCharArray(@Nullable char[] aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (aDefault, char[].class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default BigDecimal getAsBigDecimal()
getConvertedValue (BigDecimal.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default BigDecimal getAsBigDecimal(@Nullable BigDecimal aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (sDefault, BigDecimal.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default BigInteger getAsBigInteger()
getConvertedValue (BigInteger.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default BigInteger getAsBigInteger(@Nullable BigInteger aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (sDefault, BigInteger.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default LocalDate getAsLocalDate()
getConvertedValue (LocalDate.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalDate getAsLocalDate(@Nullable LocalDate aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (aDefault, LocalDate.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default LocalTime getAsLocalTime()
getConvertedValue (LocalTime.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalTime getAsLocalTime(@Nullable LocalTime aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (aDefault, LocalTime.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default LocalDateTime getAsLocalDateTime()
getConvertedValue (LocalDateTime.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalDateTime getAsLocalDateTime(@Nullable LocalDateTime aDefault)
aDefault - The value to be returned if the retrieved value is null
.getConvertedValue (aDefault, LocalDateTime.class)TypeConverterException - in case of an errorgetConvertedValue(Object,Class)@Nullable default byte[] getAsByteArray()
getConvertedValue (byte[].class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Boolean getAsBooleanObj()
getConvertedValue (Boolean.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Byte getAsByteObj()
getConvertedValue (Byte.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Character getAsCharObj()
getConvertedValue (Character.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Double getAsDoubleObj()
getConvertedValue (Double.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Float getAsFloatObj()
getConvertedValue (Float.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Integer getAsIntObj()
getConvertedValue (Integer.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Long getAsLongObj()
getConvertedValue (Long.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Short getAsShortObj()
getConvertedValue (Short.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Blob getAsSqlBlob()
getConvertedValue (Blob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Clob getAsSqlClob()
getConvertedValue (Clob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Date getAsSqlDate()
getConvertedValue (Date.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default NClob getAsSqlNClob()
getConvertedValue (NClob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default RowId getAsSqlRowId()
getConvertedValue (RowId.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Time getAsSqlTime()
getConvertedValue (Time.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Timestamp getAsSqlTimestamp()
getConvertedValue (Timestamp.class)TypeConverterException - in case of an errorgetConvertedValue(Class)Copyright © 2014–2018 Philip Helger. All rights reserved.