Interface IIPv4AddressItem

All Superinterfaces:
IAnyAtomicItem, IAtomicValuedItem, ICollectionValue, IIPAddressItem, IItem

public interface IIPv4AddressItem extends IIPAddressItem
An atomic Metapath item containing an IPv4 address data value.
  • Method Details

    • type

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

      Description copied from interface: IItem
      Get the type information for the item.
      Specified by:
      getType in interface IIPAddressItem
      Specified by:
      getType in interface IItem
      Returns:
      the item's type information
    • valueOf

      @NonNull static IIPv4AddressItem valueOf(@NonNull String value)
      Construct a new IPv4 item using the provided value.
      Parameters:
      value - an IPv4 value
      Returns:
      the new item
    • valueOf

      @NonNull static IIPv4AddressItem valueOf(@NonNull inet.ipaddr.ipv4.IPv4Address value)
      Construct a new IPv4 item using the provided value.
      Parameters:
      value - an IPv4 value
      Returns:
      the new item
    • cast

      @NonNull static IIPv4AddressItem 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
    • asIpAddress

      inet.ipaddr.ipv4.IPv4Address asIpAddress()
      Description copied from interface: IIPAddressItem
      Get the "wrapped" IP address value.
      Specified by:
      asIpAddress in interface IIPAddressItem
      Returns:
      the underlying IP address value
    • castAsType

      default IIPv4AddressItem 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