@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() throws ClassCastException
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) throws ClassCastException
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) throws ClassCastException
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) throws ClassCastException
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()
throws TypeConverterException
TypeConverterExceptiondefault boolean getAsBoolean(boolean bDefault)
default byte getAsByte()
throws TypeConverterException
TypeConverterExceptiondefault byte getAsByte(byte nDefault)
default char getAsChar()
throws TypeConverterException
TypeConverterExceptiondefault char getAsChar(char cDefault)
default double getAsDouble()
throws TypeConverterException
TypeConverterExceptiondefault double getAsDouble(double dDefault)
default float getAsFloat()
throws TypeConverterException
TypeConverterExceptiondefault float getAsFloat(float fDefault)
default int getAsInt()
throws TypeConverterException
TypeConverterExceptiondefault int getAsInt(int nDefault)
default long getAsLong()
throws TypeConverterException
TypeConverterExceptiondefault long getAsLong(long nDefault)
default short getAsShort()
throws TypeConverterException
TypeConverterExceptiondefault short getAsShort(short nDefault)
@Nullable default String getAsString() throws TypeConverterException
getConvertedValue (String.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default String getAsString(@Nullable String sDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (char[].class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default char[] getAsCharArray(@Nullable char[] aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (BigDecimal.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default BigDecimal getAsBigDecimal(@Nullable BigDecimal aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (BigInteger.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default BigInteger getAsBigInteger(@Nullable BigInteger aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (LocalDate.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalDate getAsLocalDate(@Nullable LocalDate aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (LocalTime.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalTime getAsLocalTime(@Nullable LocalTime aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (LocalDateTime.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default LocalDateTime getAsLocalDateTime(@Nullable LocalDateTime aDefault) throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (byte[].class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Boolean getAsBooleanObj() throws TypeConverterException
getConvertedValue (Boolean.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Byte getAsByteObj() throws TypeConverterException
getConvertedValue (Byte.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Character getAsCharObj() throws TypeConverterException
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() throws TypeConverterException
getConvertedValue (Float.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Integer getAsIntObj() throws TypeConverterException
getConvertedValue (Integer.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Long getAsLongObj() throws TypeConverterException
getConvertedValue (Long.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Short getAsShortObj() throws TypeConverterException
getConvertedValue (Short.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Blob getAsSqlBlob() throws TypeConverterException
getConvertedValue (Blob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Clob getAsSqlClob() throws TypeConverterException
getConvertedValue (Clob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Date getAsSqlDate() throws TypeConverterException
getConvertedValue (Date.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default NClob getAsSqlNClob() throws TypeConverterException
getConvertedValue (NClob.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default RowId getAsSqlRowId() throws TypeConverterException
getConvertedValue (RowId.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Time getAsSqlTime() throws TypeConverterException
getConvertedValue (Time.class)TypeConverterException - in case of an errorgetConvertedValue(Class)@Nullable default Timestamp getAsSqlTimestamp() throws TypeConverterException
getConvertedValue (Timestamp.class)TypeConverterException - in case of an errorgetConvertedValue(Class)Copyright © 2014–2017 Philip Helger. All rights reserved.