Class IPAddressMap.OctetPattern

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable
    Enclosing class:
    IPAddressMap<TYPE>

    private static class IPAddressMap.OctetPattern
    extends java.util.BitSet
    OctetPattern Represents a single octet wildcard. Matches the wildcard to the specified octet value.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.BitSet _mask  
    • Constructor Summary

      Constructors 
      Constructor Description
      OctetPattern​(java.lang.String octetSpec)
      Create new OctetPattern
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean match​(int number)
      Match specified octet value against the wildcard
      boolean match​(java.lang.String value)
      Match specified octet value against the wildcard
      • Methods inherited from class java.util.BitSet

        and, andNot, cardinality, clear, clear, clear, clone, equals, flip, flip, get, get, hashCode, intersects, isEmpty, length, nextClearBit, nextSetBit, or, previousClearBit, previousSetBit, set, set, set, set, size, stream, toByteArray, toLongArray, toString, valueOf, valueOf, valueOf, valueOf, xor
      • Methods inherited from class java.lang.Object

        finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • _mask

        private final java.util.BitSet _mask
    • Constructor Detail

      • OctetPattern

        public OctetPattern​(java.lang.String octetSpec)
                     throws java.lang.IllegalArgumentException
        Create new OctetPattern
        Parameters:
        octetSpec - octet wildcard specification
        Throws:
        java.lang.IllegalArgumentException - if wildcard specification is invalid
    • Method Detail

      • match

        public boolean match​(java.lang.String value)
                      throws java.lang.IllegalArgumentException
        Match specified octet value against the wildcard
        Parameters:
        value - octet value
        Returns:
        true if specified octet value matches the wildcard
        Throws:
        java.lang.IllegalArgumentException - if specified octet value is invalid
      • match

        public boolean match​(int number)
                      throws java.lang.IllegalArgumentException
        Match specified octet value against the wildcard
        Parameters:
        number - octet value
        Returns:
        true if specified octet value matches the wildcard
        Throws:
        java.lang.IllegalArgumentException - if specified octet value is invalid