Interface IMarkupItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem
All Known Subinterfaces:
IMarkupLineItem, IMarkupMultilineItem

public interface IMarkupItem extends IAnyAtomicItem
An atomic Metapath item representing a Markup data value.
  • Method Details

    • type

      @NonNull static IAtomicOrUnionType<IMarkupItem> type()
      Get the type information for this item.
      Returns:
      the type information
    • getType

      default IAtomicOrUnionType<? extends IMarkupItem> getType()
      Description copied from interface: IItem
      Get the type information for the item.
      Specified by:
      getType in interface IItem
      Returns:
      the item's type information
    • cast

      @NonNull static IMarkupItem cast(@NonNull IAnyAtomicItem item)
      Cast the provided type to this item type.
      Parameters:
      item - the item to cast
      Returns:
      the original item if it is already this type, otherwise a new item cast to this type
      Throws:
      InvalidValueForCastFunctionException - if the provided item cannot be cast to this type
    • asMarkup

      @NonNull IMarkupString<?> asMarkup()
      Get the "wrapped" markup value.
      Returns:
      the underlying markup value
    • castAsType

      default IMarkupItem castAsType(IAnyAtomicItem item)
      Description copied from interface: IAnyAtomicItem
      Cast the provided item to be the same type as this item.
      Specified by:
      castAsType in interface IAnyAtomicItem
      Parameters:
      item - the item to cast
      Returns:
      an atomic item of this type
    • compareTo

      default int compareTo(@NonNull IMarkupItem item)
      Compares this value with the argument.
      Parameters:
      item - the item to compare with this value
      Returns:
      a negative integer, zero, or a positive integer if this value is less than, equal to, or greater than the item.