Package org.openstack4j.model.network
Enum IPVersionType
- java.lang.Object
-
- java.lang.Enum<IPVersionType>
-
- org.openstack4j.model.network.IPVersionType
-
- All Implemented Interfaces:
Serializable,Comparable<IPVersionType>
public enum IPVersionType extends Enum<IPVersionType>
IP Address Version Type (V4/V6)- Author:
- Jeremy Unruh
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetVersion()Gets the version in Integer formstatic IPVersionTypevalueOf(int value)Returns the enum constant of this type with the specified name.static IPVersionTypevalueOf(String name)Returns the enum constant of this type with the specified name.static IPVersionType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
V4
public static final IPVersionType V4
-
V6
public static final IPVersionType V6
-
-
Method Detail
-
values
public static IPVersionType[] 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 (IPVersionType c : IPVersionType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static IPVersionType 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 nameNullPointerException- if the argument is null
-
valueOf
public static IPVersionType valueOf(int value)
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:
value- 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 nameNullPointerException- if the argument is null
-
getVersion
public int getVersion()
Gets the version in Integer form- Returns:
- the version as int
-
-