Package org.bitcoinj.core
Enum ProtocolVersion
- java.lang.Object
-
- java.lang.Enum<ProtocolVersion>
-
- org.bitcoinj.core.ProtocolVersion
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Comparable<ProtocolVersion>
public enum ProtocolVersion extends java.lang.Enum<ProtocolVersion>
Define important versions of the Bitcoin Protocol
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BLOOM_FILTER
BLOOM_FILTER_BIP111
CURRENT
FEEFILTER
MINIMUM
PONG
Deprecated.WITNESS_VERSION
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description int
getBitcoinProtocolVersion()
Deprecated.UseintValue()
int
intValue()
static ProtocolVersion
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.static ProtocolVersion[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
MINIMUM
public static final ProtocolVersion MINIMUM
-
PONG
@Deprecated public static final ProtocolVersion PONG
Deprecated.
-
BLOOM_FILTER
public static final ProtocolVersion BLOOM_FILTER
-
BLOOM_FILTER_BIP111
public static final ProtocolVersion BLOOM_FILTER_BIP111
-
WITNESS_VERSION
public static final ProtocolVersion WITNESS_VERSION
-
FEEFILTER
public static final ProtocolVersion FEEFILTER
-
CURRENT
public static final ProtocolVersion CURRENT
-
-
Method Detail
-
values
public static ProtocolVersion[] 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 (ProtocolVersion c : ProtocolVersion.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ProtocolVersion valueOf(java.lang.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:
java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is null
-
intValue
public int intValue()
- Returns:
- protocol version as an integer value
-
getBitcoinProtocolVersion
@Deprecated public int getBitcoinProtocolVersion()
Deprecated.UseintValue()
-
-