com.h3c.util.ip

## Enum IpAddress.AddressClass

- java.lang.Object
- - java.lang.Enum<IpAddress.AddressClass>
  - - com.h3c.util.ip.IpAddress.AddressClass

- All Implemented Interfaces:
    Serializable, Comparable<IpAddress.AddressClass>
  Enclosing class:
    IpAddress

      public static enum IpAddress.AddressClass
      extends Enum<IpAddress.AddressClass>

  Specifies the IP address class. A,B,C,D,E for IPv4, or CLASSLESS for IPv6.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `A`
    `B`
    `C`
    `CLASSLESS`
    `D`
    `E`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `SubnetMask` | `getImpliedMask()` Returns the subnet mask implied by the address class, for classes A, B, C; null for other classes.
    `Subnet` | `getPrivateNetwork()` Returns the subnet representing the "private network" defined for the address class, for classes A, B, C; null for other classes.
    `static IpAddress.AddressClass` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static IpAddress.AddressClass[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### A

          public static final IpAddress.AddressClass A

    - #### B

          public static final IpAddress.AddressClass B

    - #### C

          public static final IpAddress.AddressClass C

    - #### D

          public static final IpAddress.AddressClass D

    - #### E

          public static final IpAddress.AddressClass E

    - #### CLASSLESS

          public static final IpAddress.AddressClass CLASSLESS

  - ### Method Detail

    - #### values

          public static IpAddress.AddressClass[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (IpAddress.AddressClass c : IpAddress.AddressClass.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static IpAddress.AddressClass valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### getPrivateNetwork

          public Subnet getPrivateNetwork()

      Returns the subnet representing the "private network" defined for the address class, for classes A, B, C; null for other classes. That is:

            Class A : "10.0.0.0/8"
            Class B : "172.16.0.0/12"
            Class C : "192.168.0.0/16"

      Returns:
        the private network

    - #### getImpliedMask

          public SubnetMask getImpliedMask()

      Returns the subnet mask implied by the address class, for classes A, B, C; null for other classes. That is:

            Class A : 255.0.0.0
            Class B : 255.255.0.0
            Class C : 255.255.255.0

      Returns:
        the implied subnet mask

Copyright © 2014. All Rights Reserved.