Module inet.ipaddr

Interface AddressComponentRange

    • Method Detail

      • getLower

        AddressComponent getLower()
        If this instance represents multiple address items, returns the one with the lowest numeric value.
        Returns:
      • getUpper

        AddressComponent getUpper()
        If this instance represents multiple address items, returns the one with the highest numeric value.
        Returns:
      • getIterable

        java.lang.Iterable<? extends AddressComponent> getIterable()
        Useful for using an instance in a "for-each loop". Otherwise just call iterator() directly.
        Returns:
      • iterator

        java.util.Iterator<? extends AddressComponent> iterator()
        Iterates through the individual address components.

        An address component can represent an individual segment, address, or section, or it can represent multiple, typically a subnet of addresses or a range of segment or section values.

        Call AddressItem.isMultiple() to determine if this instance represents multiple, or AddressItem.getCount() for the count.

        Returns:
      • stream

        java.util.stream.Stream<? extends AddressComponent> stream()
        Returns a sequential stream of the individual address components. For a parallel stream, call BaseStream.parallel() on the returned stream.
        Returns:
      • stream

        @SafeVarargs
        static <T extends AddressComponent> java.util.stream.Stream<T> stream​(java.util.function.Function<T,​java.util.stream.Stream<? extends T>> addrStreamFunc,
                                                                              T... components)
        Given a list of components, and a lambda that returns a stream for that component type, returns a combined stream produced by applying that lambda to all the components.
        Parameters:
        addrStreamFunc -
        components -
        Returns:
      • stream

        static <T extends AddressComponent> java.util.stream.Stream<T> stream​(java.util.function.Function<T,​java.util.stream.Stream<? extends T>> addrStreamFunc,
                                                                              java.util.Collection<? extends T> components)
        Given a list of components, and a lambda that returns a stream for that component type, returns a sequential combined stream produced by applying that lambda to all the components. For a parallel stream, call BaseStream.parallel() on the returned stream.
        Parameters:
        addrStreamFunc -
        components -
        Returns: