Skip to content

Proposal for toString representation of AsnRange and AbstractIpRange #19

@dadepo

Description

@dadepo

In practice, we have had to render a collection of different ip numbers (asn, ipv4, ipv6) as strings.

The current string representation is in the format startIp - endIp and since the library also supports constructing a range with both values as start and end, or converting a single ASN to a range, you run into the situation where the string representation becomes a little bit redundant.

For example new Asn(3333l).asRange(); gives AS3333-AS3333 which appears redundant, and IMHO, strictly speaking, is not even a range if it starts and end with the same value.

Will it be an acceptable proposal to have the toString representation return just a value in cases where a range contains just one value?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions