java.lang.Object
net.andreinc.mockneat.abstraction.MockUnitBase
net.andreinc.mockneat.unit.networking.IPv4s
All Implemented Interfaces:
MockUnit<java.lang.String>, MockUnitString

public class IPv4s
extends MockUnitBase
implements MockUnitString
  • Constructor Details

  • Method Details

    • ipv4s

      public static IPv4s ipv4s()

      Returns a IPv4s object that can be used to generate arbitrary IPv4 addresses.

      Returns:
      A re-usable IPv4s object. The IPv4s class implements MockUnitString.
    • supplier

      public java.util.function.Supplier<java.lang.String> supplier()
      Description copied from interface: MockUnit
      This is the sole abstract method of the interface. Needs to be implemented every-time a MockUnit is implemented.
      Specified by:
      supplier in interface MockUnit<java.lang.String>
      Returns:
      A Supplier<T>.
    • types

      public MockUnitString types​(IPv4Type... types)

      This method can be used to narrow down the IPv4 generation process to a few types.

      Parameters:
      types - The types array (var-arg).
      Returns:
      A new MockUnitString.
    • type

      public MockUnitString type​(IPv4Type type)

      This method can be used to narrow down the IPv4 generation process to a certain type.

      Parameters:
      type - The type of array to be generated.
      Returns:
      A new MockUnitString.