@Test public void getAddressBits() { assertThat(PrefixSpace.getAddressBits(Ip.ZERO), equalTo(new BitSet())); assertThat( PrefixSpace.getAddressBits(Ip.MAX), equalTo(BitSet.valueOf(new long[] {0xff_ff_ff_ffL}))); assertThat( PrefixSpace.getAddressBits(Ip.parse("128.255.31.3")), equalTo(BitSet.valueOf(new long[] {0xc0_f8_ff_01L}))); }
static BitSet getAddressBits(Ip address) { return BitSet.valueOf(new long[] {Integer.reverse((int) address.asLong()) & 0xffffffffL}); }
PrefixSpace implements Serializable { static BitSet getAddressBits(Ip address) { return BitSet.valueOf(new long[] {Integer.reverse((int) address.asLong()) & 0xffffffffL}); } }
PrefixSpace implements Serializable { static BitSet getAddressBits(Ip address) { return BitSet.valueOf(new long[] {Integer.reverse((int) address.asLong()) & 0xffffffffL}); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); }
PrefixSpace implements Serializable { static BitSet getAddressBits(Ip address) { return BitSet.valueOf(new long[] {Integer.reverse((int) address.asLong()) & 0xffffffffL}); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); void addPrefix(Prefix prefix); void addPrefixRange(PrefixRange prefixRange); void addSpace(PrefixSpace prefixSpace); boolean containsPrefix(Prefix prefix); boolean containsPrefixRange(PrefixRange prefixRange); @Override boolean equals(Object obj); Set<PrefixRange> getPrefixRanges(); @Override int hashCode(); PrefixSpace intersection(PrefixSpace intersectSpace); @JsonIgnore boolean isEmpty(); boolean overlaps(PrefixSpace intersectSpace); @Override String toString(); }
PrefixSpace implements Serializable { static BitSet getAddressBits(Ip address) { return BitSet.valueOf(new long[] {Integer.reverse((int) address.asLong()) & 0xffffffffL}); } PrefixSpace(); @JsonCreator  PrefixSpace(Iterable<PrefixRange> prefixRanges);  PrefixSpace(PrefixRange... prefixRanges); void addPrefix(Prefix prefix); void addPrefixRange(PrefixRange prefixRange); void addSpace(PrefixSpace prefixSpace); boolean containsPrefix(Prefix prefix); boolean containsPrefixRange(PrefixRange prefixRange); @Override boolean equals(Object obj); Set<PrefixRange> getPrefixRanges(); @Override int hashCode(); PrefixSpace intersection(PrefixSpace intersectSpace); @JsonIgnore boolean isEmpty(); boolean overlaps(PrefixSpace intersectSpace); @Override String toString();  }