Interface IdPAttributeValue

All Superinterfaces:
Comparable<IdPAttributeValue>
All Known Implementing Classes:
ByteAttributeValue, EmptyAttributeValue, ScopedStringAttributeValue, StringAttributeValue, XMLObjectAttributeValue

public interface IdPAttributeValue
extends Comparable<IdPAttributeValue>
Interface for values of an IdPAttribute. This interface provides an explicit method for getting the value of an attribute as opposed to any other data that may be associated with the value, as well as a displayable value.

Implementations of this interface MUST implement an appropriate Object.equals(Object) and Object.hashCode() method. They should also implement Object.toString() such that useful representations may be written out in log messages.

Implementations are expected to implement a natively typed getValue() method. This will usually be like the getNativeValue() the outlier being the ScopedStringAttributeValue which for legacy reasons returns only the head part of the value for getValue().

  • Method Summary

    Modifier and Type Method Description
    default int compareTo​(IdPAttributeValue value)
    String getDisplayValue()
    Get a displayable form of the value for user interfaces and similar purposes.
    Object getNativeValue()
    Get the native representation of the value of this attribute.
  • Method Details

    • getNativeValue

      @Nonnull Object getNativeValue()
      Get the native representation of the value of this attribute.
      Returns:
      the attribute value in native format.
    • getDisplayValue

      @Nonnull @NotEmpty String getDisplayValue()
      Get a displayable form of the value for user interfaces and similar purposes.
      Returns:
      a displayable value
    • compareTo

      default int compareTo​(IdPAttributeValue value)
      Specified by:
      compareTo in interface Comparable<IdPAttributeValue>