com.scalacraft.domain.v2.net.unconstrained

IP4Address

Related Docs: object IP4Address | package unconstrained

case class IP4Address(byte1: Int, byte2: Int, byte3: Int, byte4: Int) extends Product with Serializable

An IP4Address represents an IP4 address.

This class does not constrain the value of the address components.

Pattern Matching

Pattern matching is supported as the following example demonstrates,

"192.162.0.9" match {
case IP4Address(b1, b2, _, _) => Some(b1, b2) // Some(192, 162)
case _ => None
}
Implicit Conversions

Implicit conversions exist which allow an instance of IP4Address when a String is required.

val ipa = IP4Address(b1, b2, b3, b4)
val inet = java.v2.InetAddress.getByName(ipa)

A conversion to an option of the constrained version of this class is also available.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. IP4Address
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new IP4Address(byte1: Int, byte2: Int, byte3: Int, byte4: Int)

Value Members

  1. final def !=(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  5. val byte1: Int

  6. val byte2: Int

  7. val byte3: Int

  8. val byte4: Int

  9. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped