Package com.helger.commons.traits
Interface IGetterByIndexTrait
-
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface IGetterByIndexTrait
A generic convert Object to anything with convenience API.- Author:
- Philip Helger
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default BigDecimalgetAsBigDecimal(int nIndex)default BigDecimalgetAsBigDecimal(int nIndex, BigDecimal aDefault)default BigIntegergetAsBigInteger(int nIndex)default BigIntegergetAsBigInteger(int nIndex, BigInteger aDefault)default booleangetAsBoolean(int nIndex)default booleangetAsBoolean(int nIndex, boolean bDefault)default BooleangetAsBooleanObj(int nIndex)default bytegetAsByte(int nIndex)default bytegetAsByte(int nIndex, byte nDefault)default byte[]getAsByteArray(int nIndex)default BytegetAsByteObj(int nIndex)default chargetAsChar(int nIndex)default chargetAsChar(int nIndex, char cDefault)default char[]getAsCharArray(int nIndex)default char[]getAsCharArray(int nIndex, char[] aDefault)default CharactergetAsCharObj(int nIndex)default doublegetAsDouble(int nIndex)default doublegetAsDouble(int nIndex, double dDefault)default DoublegetAsDoubleObj(int nIndex)default floatgetAsFloat(int nIndex)default floatgetAsFloat(int nIndex, float fDefault)default FloatgetAsFloatObj(int nIndex)default intgetAsInt(int nIndex)default intgetAsInt(int nIndex, int nDefault)default IntegergetAsIntObj(int nIndex)default LocalDategetAsLocalDate(int nIndex)default LocalDategetAsLocalDate(int nIndex, LocalDate aDefault)default LocalDategetAsLocalDate(int nIndex, Locale aContentLocale)Get the value as a String, interpreted as aLocalDate.default LocalDateTimegetAsLocalDateTime(int nIndex)default LocalDateTimegetAsLocalDateTime(int nIndex, LocalDateTime aDefault)default LocalDateTimegetAsLocalDateTime(int nIndex, Locale aContentLocale)Get the value as a String, interpreted as aLocalDateTime.default LocalTimegetAsLocalTime(int nIndex)default LocalTimegetAsLocalTime(int nIndex, LocalTime aDefault)default LocalTimegetAsLocalTime(int nIndex, Locale aContentLocale)Get the value as a String, interpreted as aLocalTime.default longgetAsLong(int nIndex)default longgetAsLong(int nIndex, long nDefault)default LonggetAsLongObj(int nIndex)default shortgetAsShort(int nIndex)default shortgetAsShort(int nIndex, short nDefault)default ShortgetAsShortObj(int nIndex)default BlobgetAsSqlBlob(int nIndex)default ClobgetAsSqlClob(int nIndex)default DategetAsSqlDate(int nIndex)default NClobgetAsSqlNClob(int nIndex)default RowIdgetAsSqlRowId(int nIndex)default TimegetAsSqlTime(int nIndex)default TimestampgetAsSqlTimestamp(int nIndex)default StringgetAsString(int nIndex)default StringgetAsString(int nIndex, String sDefault)default ICommonsList<String>getAsStringList(int nIndex)Get a list of all attribute values with the same name.default ICommonsList<String>getAsStringList(int nIndex, ICommonsList<String> aDefault)Get a list of all attribute values with the same name.default ICommonsOrderedSet<String>getAsStringSet(int nIndex)Get a set of all attribute values with the same name.default ICommonsOrderedSet<String>getAsStringSet(int nIndex, ICommonsOrderedSet<String> aDefault)Get a set of all attribute values with the same name.default <T> TgetCastedValue(int nIndex)Get the contained value casted to the return type.default <T> TgetCastedValue(int nIndex, Class<T> aClass)Get the contained value casted to the specified class.default <T> TgetCastedValue(int nIndex, T aDefault)Get the contained value casted to the return type.default <T> TgetCastedValue(int nIndex, T aDefault, Class<T> aClass)Get the contained value casted to the specified class.default <T> TgetConvertedValue(int nIndex, Class<T> aClass)Get the contained value converted using TypeConverter to the passed class.default <T> TgetConvertedValue(int nIndex, T aDefault, Class<T> aClass)Get the contained value converted using TypeConverter to the passed class.default <T> TgetSafeCastedValue(int nIndex, Class<T> aClass)Get the contained value casted to the specified class, but only if the cast is possible.default <T> TgetSafeCastedValue(int nIndex, T aDefault, Class<T> aClass)Get the contained value casted to the specified class, but only if the cast is possible.ObjectgetValue(int nIndex)Get the value at the specified index.default Class<?>getValueClass(int nIndex)default booleanhasNoValue(int nIndex)default booleanhasStringValue(int nIndex, String sDesiredValue)Check if a attribute with the given name is present in the request and has the specified value.default booleanhasStringValue(int nIndex, String sDesiredValue, boolean bDefault)Check if a attribute with the given name is present in the request and has the specified value.default booleanhasValue(int nIndex)default voidonSafeCastError(int nIndex, Class<?> aClass, Object aValue)Implement this method to handle cases ofgetSafeCastedValue(int, Object, Class)that failed because invalid provided class.
-
-
-
Method Detail
-
getValue
@Nullable Object getValue(@Nonnegative int nIndex)
Get the value at the specified index.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
- The value at the specified index. No
nullconstraints applicable.
-
getValueClass
@Nullable default Class<?> getValueClass(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
- The class of the value or
nullif no value is contained.
-
hasValue
default boolean hasValue(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
trueif the value is notnull. Same asgetValue()!=null.
-
hasNoValue
default boolean hasNoValue(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
trueif the value isnull. Same asgetValue()==null.
-
getCastedValue
@Nullable default <T> T getCastedValue(@Nonnegative int nIndex)
Get the contained value casted to the return type.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
getCastedValue
@Nullable default <T> T getCastedValue(@Nonnegative int nIndex, @Nullable T aDefault)
Get the contained value casted to the return type.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
getCastedValue
@Nullable default <T> T getCastedValue(@Nonnegative int nIndex, @Nonnull Class<T> aClass)
Get the contained value casted to the specified class.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aClass- The class to cast to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
getCastedValue
@Nullable default <T> T getCastedValue(@Nonnegative int nIndex, @Nullable T aDefault, @Nonnull Class<T> aClass)
Get the contained value casted to the specified class.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.aClass- The class to cast to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
getSafeCastedValue
@Nullable default <T> T getSafeCastedValue(@Nonnegative int nIndex, @Nonnull Class<T> aClass)
Get the contained value casted to the specified class, but only if the cast is possible.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aClass- The class to cast to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
onSafeCastError
default void onSafeCastError(@Nonnegative int nIndex, @Nonnull Class<?> aClass, @Nonnull Object aValue)
Implement this method to handle cases ofgetSafeCastedValue(int, Object, Class)that failed because invalid provided class."Index '" + nIndex + "' is present, but not as a " + aClass + " but as a " + aValue.getClass ()
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aClass- The class that was desiredaValue- The value that was retrieved and cannot be casted to the class- Since:
- 9.0.1
-
getSafeCastedValue
@Nullable default <T> T getSafeCastedValue(@Nonnegative int nIndex, @Nullable T aDefault, @Nonnull Class<T> aClass)
Get the contained value casted to the specified class, but only if the cast is possible.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.aClass- The class to cast to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
ClassCastException- in case the value types are not convertible
-
getConvertedValue
@Nullable default <T> T getConvertedValue(@Nonnegative int nIndex, @Nonnull Class<T> aClass)
Get the contained value converted using TypeConverter to the passed class.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aClass- The class to convert to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
TypeConverterException- in case of an error
-
getConvertedValue
@Nullable default <T> T getConvertedValue(@Nonnegative int nIndex, @Nullable T aDefault, @Nonnull Class<T> aClass)
Get the contained value converted using TypeConverter to the passed class.- Type Parameters:
T- Destination type- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnullor if type conversion fails.aClass- The class to convert to.- Returns:
- The object value casted to the passed class. May be
nullif the contained value isnull. - Throws:
TypeConverterException- in case of an error
-
getAsBoolean
default boolean getAsBoolean(@Nonnegative int nIndex)
-
getAsBoolean
default boolean getAsBoolean(@Nonnegative int nIndex, boolean bDefault)
-
getAsByte
default byte getAsByte(@Nonnegative int nIndex)
-
getAsByte
default byte getAsByte(@Nonnegative int nIndex, byte nDefault)
-
getAsChar
default char getAsChar(@Nonnegative int nIndex)
-
getAsChar
default char getAsChar(@Nonnegative int nIndex, char cDefault)
-
getAsDouble
default double getAsDouble(@Nonnegative int nIndex)
-
getAsDouble
default double getAsDouble(@Nonnegative int nIndex, double dDefault)
-
getAsFloat
default float getAsFloat(@Nonnegative int nIndex)
-
getAsFloat
default float getAsFloat(@Nonnegative int nIndex, float fDefault)
-
getAsInt
default int getAsInt(@Nonnegative int nIndex)
-
getAsInt
default int getAsInt(@Nonnegative int nIndex, int nDefault)
-
getAsLong
default long getAsLong(@Nonnegative int nIndex)
-
getAsLong
default long getAsLong(@Nonnegative int nIndex, long nDefault)
-
getAsShort
default short getAsShort(@Nonnegative int nIndex)
-
getAsShort
default short getAsShort(@Nonnegative int nIndex, short nDefault)
-
getAsString
@Nullable default String getAsString(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,String.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsString
@Nullable default String getAsString(@Nonnegative int nIndex, @Nullable String sDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.sDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,sDefault, String.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsCharArray
@Nullable default char[] getAsCharArray(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,char[].class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsCharArray
@Nullable default char[] getAsCharArray(@Nonnegative int nIndex, @Nullable char[] aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault, char[].class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsBigDecimal
@Nullable default BigDecimal getAsBigDecimal(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,BigDecimal.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsBigDecimal
@Nullable default BigDecimal getAsBigDecimal(@Nonnegative int nIndex, @Nullable BigDecimal aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault,BigDecimal.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsBigInteger
@Nullable default BigInteger getAsBigInteger(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,BigInteger.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsBigInteger
@Nullable default BigInteger getAsBigInteger(@Nonnegative int nIndex, @Nullable BigInteger aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault,BigInteger.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalDate
@Nullable default LocalDate getAsLocalDate(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,LocalDate.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalDate
@Nullable default LocalDate getAsLocalDate(@Nonnegative int nIndex, @Nullable LocalDate aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault,LocalDate.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalTime
@Nullable default LocalTime getAsLocalTime(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,LocalTime.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalTime
@Nullable default LocalTime getAsLocalTime(@Nonnegative int nIndex, @Nullable LocalTime aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault,LocalTime.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalDateTime
@Nullable default LocalDateTime getAsLocalDateTime(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,LocalDateTime.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalDateTime
@Nullable default LocalDateTime getAsLocalDateTime(@Nonnegative int nIndex, @Nullable LocalDateTime aDefault)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The value to be returned if the retrieved value isnull.- Returns:
getConvertedValue (nIndex,aDefault,LocalDateTime.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsByteArray
@Nullable default byte[] getAsByteArray(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,byte[].class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsBooleanObj
@Nullable default Boolean getAsBooleanObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Boolean.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsByteObj
@Nullable default Byte getAsByteObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Byte.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsCharObj
@Nullable default Character getAsCharObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Character.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsDoubleObj
@Nullable default Double getAsDoubleObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Double.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsFloatObj
@Nullable default Float getAsFloatObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Float.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsIntObj
@Nullable default Integer getAsIntObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Integer.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLongObj
@Nullable default Long getAsLongObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Long.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsShortObj
@Nullable default Short getAsShortObj(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Short.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlBlob
@Nullable default Blob getAsSqlBlob(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Blob.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlClob
@Nullable default Clob getAsSqlClob(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Clob.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlDate
@Nullable default Date getAsSqlDate(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Date.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlNClob
@Nullable default NClob getAsSqlNClob(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,NClob.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlRowId
@Nullable default RowId getAsSqlRowId(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,RowId.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlTime
@Nullable default Time getAsSqlTime(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Time.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsSqlTimestamp
@Nullable default Timestamp getAsSqlTimestamp(@Nonnegative int nIndex)
- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
getConvertedValue (nIndex,null,Timestamp.class)- See Also:
getConvertedValue(int,Object,Class)
-
getAsLocalDate
@Nullable default LocalDate getAsLocalDate(@Nonnegative int nIndex, @Nonnull Locale aContentLocale)
Get the value as a String, interpreted as aLocalDate.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aContentLocale- Locale to use for conversion.- Returns:
nullif either the conversion to String or the parsing of the String failed.
-
getAsLocalTime
@Nullable default LocalTime getAsLocalTime(@Nonnegative int nIndex, @Nonnull Locale aContentLocale)
Get the value as a String, interpreted as aLocalTime.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aContentLocale- Locale to use for conversion.- Returns:
nullif either the conversion to String or the parsing of the String failed.
-
getAsLocalDateTime
@Nullable default LocalDateTime getAsLocalDateTime(@Nonnegative int nIndex, @Nonnull Locale aContentLocale)
Get the value as a String, interpreted as aLocalDateTime.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aContentLocale- Locale to use for conversion.- Returns:
nullif either the conversion to String or the parsing of the String failed.
-
getAsStringList
@Nullable default ICommonsList<String> getAsStringList(@Nonnegative int nIndex)
Get a list of all attribute values with the same name.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
nullif no such attribute value exists
-
getAsStringList
@Nullable default ICommonsList<String> getAsStringList(@Nonnegative int nIndex, @Nullable ICommonsList<String> aDefault)
Get a list of all attribute values with the same name.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The default value to be returned, if no such attribute is present.- Returns:
aDefaultif no such attribute value exists
-
getAsStringSet
@Nullable default ICommonsOrderedSet<String> getAsStringSet(@Nonnegative int nIndex)
Get a set of all attribute values with the same name.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.- Returns:
nullif no such attribute value exists
-
getAsStringSet
@Nullable default ICommonsOrderedSet<String> getAsStringSet(@Nonnegative int nIndex, @Nullable ICommonsOrderedSet<String> aDefault)
Get a set of all attribute values with the same name.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.aDefault- The default value to be returned, if no such attribute is present.- Returns:
aDefaultif no such attribute value exists
-
hasStringValue
default boolean hasStringValue(@Nonnegative int nIndex, @Nullable String sDesiredValue)
Check if a attribute with the given name is present in the request and has the specified value.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.sDesiredValue- The value to be matched- Returns:
trueif an attribute with the given name is present and has the desired value
-
hasStringValue
default boolean hasStringValue(@Nonnegative int nIndex, @Nullable String sDesiredValue, boolean bDefault)
Check if a attribute with the given name is present in the request and has the specified value. If no such attribute is present, the passed default value is returned.- Parameters:
nIndex- The index to be accessed. Should be ≥ 0.sDesiredValue- The value to be matchedbDefault- the default value to be returned, if the specified attribute is not present- Returns:
trueif an attribute with the given name is present and has the desired value,falseif the attribute is present but has a different value. If the attribute is not present, the default value is returned.
-
-