CIDR Utility

Provides POJO representations of CIDR ranges.

License

License

Categories

Categories

Utility General Purpose Libraries
GroupId

GroupId

com.torchmind.utility
ArtifactId

ArtifactId

cidr
Last Version

Last Version

2.1.0
Release Date

Release Date

Type

Type

jar
Description

Description

CIDR Utility
Provides POJO representations of CIDR ranges.
Project URL

Project URL

https://github.com/Torchmind/CIDRUtility
Project Organization

Project Organization

Torchmind
Source Code Management

Source Code Management

https://github.com/Torchmind/CIDRUtility

Download cidr

How to add to project

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

Dependencies

provided (1)

Group / Artifact Type Version
com.github.spotbugs : spotbugs-annotations jar 3.1.1

test (2)

Group / Artifact Type Version
junit : junit jar 4.12
org.mockito : mockito-core jar 2.15.0

Project Modules

There are no modules declared in this project.

License Maven Central GitHub Release CircleCI

CIDR Notation Utility

Table of Contents

About

Provides POJO representations for the CIDR notation.

Contacts

Using

When running maven you may simply add a new dependency to your pom.xml:

<dependencies>
  <dependency>
    <groupId>com.torchmind.utility</groupId>
    <artifactId>cidr</artifactId>
    <version>2.1.0</version>
  </dependency>
</dependencies>

Loading a configuration file by using the Candle implementation:

CIDRNotation range = CIDRNotation.of("10.0.0.0/8");

if (range.matches("10.13.37.1")) {
  // Things
}

// OR

InetAddress address = ...;
if (range.matches(address)) {
  // Things
}

Issues

You encountered problems with the library or have a suggestion? Create an issue!

  1. Make sure your issue has not been fixed in a newer version (check the list of closed issues
  2. Create a new issue from the issues page
  3. Enter your issue's title (something that summarizes your issue) and create a detailed description containing:
    • What is the expected result?
    • What problem occurs?
    • How to reproduce the problem?
    • Crash Log (Please use a Pastebin service)
  4. Click "Submit" and wait for further instructions

Building

  1. Clone this repository via git clone https://github.com/Torchmind/CIDRUtility.git or download a zip
  2. Build the modification by running mvn clean install
  3. The resulting jars can be found in target

Contributing

Before you add any major changes to the library you may want to discuss them with us (see Contact) as we may choose to reject your changes for various reasons. All contributions are applied via Pull-Requests. Patches will not be accepted. Also be aware that all of your contributions are made available under the terms of the Apache License 2.0. Please read the Contribution Guidelines for more information.

com.torchmind.utility

Torchmind

Versions

Version
2.1.0