Interface IIPAddressItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IItem
All Known Subinterfaces:
IIPv4AddressItem, IIPv6AddressItem

public interface IIPAddressItem extends IAnyAtomicItem
An atomic Metapath item representing an IP address data value.
  • Method Details

    • type

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

      default IAtomicOrUnionType<? extends IIPAddressItem> 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
    • asIpAddress

      @NonNull inet.ipaddr.IPAddress asIpAddress()
      Get the "wrapped" IP address value.
      Returns:
      the underlying IP address value
    • compareTo

      default int compareTo(IIPAddressItem 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.
    • cast

      @NonNull static IIPAddressItem 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