orchard

Match IP addresses to CIDR blocks

License

License

GroupId

GroupId

com.aaronbedra
ArtifactId

ArtifactId

orchard
Last Version

Last Version

1.0.0
Release Date

Release Date

Type

Type

jar
Description

Description

orchard
Match IP addresses to CIDR blocks
Project URL

Project URL

https://github.com/abedra/orchard
Source Code Management

Source Code Management

https://github.com/abedra/orchard

Download orchard

How to add to project

<!-- https://jarcasting.com/artifacts/com.aaronbedra/orchard/ -->
<dependency>
    <groupId>com.aaronbedra</groupId>
    <artifactId>orchard</artifactId>
    <version>1.0.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.aaronbedra/orchard/
implementation 'com.aaronbedra:orchard:1.0.0'
// https://jarcasting.com/artifacts/com.aaronbedra/orchard/
implementation ("com.aaronbedra:orchard:1.0.0")
'com.aaronbedra:orchard:jar:1.0.0'
<dependency org="com.aaronbedra" name="orchard" rev="1.0.0">
  <artifact name="orchard" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.aaronbedra', module='orchard', version='1.0.0')
)
libraryDependencies += "com.aaronbedra" % "orchard" % "1.0.0"
[com.aaronbedra/orchard "1.0.0"]

Dependencies

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Orchard Build Status License

A CIDR processing library for Java. Supports IPv4 and IPv6 Addresses.

Installation

<dependency>
    <groupId>com.aaronbedra</groupId>
    <artifactId>orchard</artifactId>
    <version>0.2.0</version>
</dependency>

Usage

import com.aaronbedra.orchard.CIDR;

if (CIDR.valueOf("1.1.1.0/24").contains("1.1.1.2")) {
  // do stuff
} else {
  // do other stuff
}
import com.aaronbedra.orchard.CIDR;

int mask = CIDR.valueOf("1.1.1.0/24").getMask();

Versions

Version
1.0.0
0.2.0
0.1.1
0.1.0
0.0.4
0.0.2
0.0.1