Package org.symbol.sdk.symbol.models
Class AccountRestrictionFlags
java.lang.Object
org.symbol.sdk.symbol.models.AccountRestrictionFlags
- All Implemented Interfaces:
Serializer
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final AccountRestrictionFlagsstatic final AccountRestrictionFlagsstatic final AccountRestrictionFlagsstatic final AccountRestrictionFlagsstatic final AccountRestrictionFlagsfinal int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AccountRestrictionFlagsdeserialize(ByteBuffer buffer) Deserializes an instance of this object from a byte payload.booleanCompares this object with another for equality.static AccountRestrictionFlagsfromValue(int value) Creates an instance from its underlying numeric value.intgetValue()Gets the value field.booleanhas(int flag) Checks whether a flag is set.inthashCode()Computes the hash code of this object.static AccountRestrictionFlagsParses a raw value into an instance.byte[]Serializes this object to bytes.intsize()Calculates the size of the object.inttoJson()Converts this object to a JSON-serializable representation.toString()Returns a string representation of this object.
-
Field Details
-
ADDRESS
-
MOSAIC_ID
-
TRANSACTION_TYPE
-
OUTGOING
-
BLOCK
-
value
public final int value
-
-
Constructor Details
-
AccountRestrictionFlags
public AccountRestrictionFlags(int value) Creates a new AccountRestrictionFlags.- Parameters:
value- Value.
-
-
Method Details
-
getValue
public int getValue()- AccountRestrictionFlags.getValue
- Gets the value field.
- Returns:
- The value field.
-
fromValue
- AccountRestrictionFlags.fromValue
- Creates an instance from its underlying numeric value.
- Parameters:
value- Value.- Returns:
- Instance corresponding to the numeric value.
-
parse
- AccountRestrictionFlags.parse
- Parses a raw value into an instance.
- Parameters:
rawValue- Raw value to parse.- Returns:
- Parsed instance.
-
has
public boolean has(int flag) - AccountRestrictionFlags.has
- Checks whether a flag is set.
- Parameters:
flag- Flag bit(s) to test.- Returns:
- true if the flag is set, false otherwise.
-
equals
- AccountRestrictionFlags.equals
- Compares this object with another for equality.
-
hashCode
public int hashCode()- AccountRestrictionFlags.hashCode
- Computes the hash code of this object.
-
size
public int size()- AccountRestrictionFlags.size
- Calculates the size of the object.
- Specified by:
sizein interfaceSerializer- Returns:
- Size of this object in bytes.
-
deserialize
- AccountRestrictionFlags.deserialize
- Deserializes an instance of this object from a byte payload.
- Parameters:
buffer- Output writer.- Returns:
- Deserialized object.
- Throws:
IndexOutOfBoundsException- if the buffer is truncated or a declared length overruns itIllegalArgumentException- if a field carries an invalid value (e.g. a reserved field or unknown discriminator)
-
serialize
public byte[] serialize()- AccountRestrictionFlags.serialize
- Serializes this object to bytes.
- Specified by:
serializein interfaceSerializer- Returns:
- Serialized bytes.
-
toString
- AccountRestrictionFlags.toString
- Returns a string representation of this object.
-
toJson
public int toJson()- AccountRestrictionFlags.toJson
- Converts this object to a JSON-serializable representation.
- Returns:
- JSON-serializable representation of this object.
-