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