Skip to content

Commit

Permalink
add example
Browse files Browse the repository at this point in the history
  • Loading branch information
martijnhoekstra committed Oct 18, 2023
1 parent fe556b2 commit 9c1f114
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion shared/src/main/scala/com/comcast/ip4s/Cidr.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,13 @@ sealed class Cidr[+A <: IpAddress] protected (val address: A, val prefixBits: In
* is (and prints as) a spec-valid cidr range, with no bits outside the routing mask set.
*
* @return a normalized cidr range
*
* @example {{{
* scala> Cidr(ipv4"10.11.12.13", 8).normalized
* res0: Cidr.Strict[Ipv4Address] = 10.0.0.0/8
* }}}
*/
def normalized: Strict[A] = Cidr.Strict(this)
def normalized: Strict[A] = Cidr.Strict(this)

/** Returns the routing mask.
*
Expand Down

0 comments on commit 9c1f114

Please sign in to comment.