Package org.tinyradius.attribute
Class IntegerAttribute
java.lang.Object
org.tinyradius.attribute.RadiusAttribute
org.tinyradius.attribute.IntegerAttribute
public class IntegerAttribute extends RadiusAttribute
This class represents a Radius attribute which only contains a 32 bit integer.
-
Constructor Summary
Constructors Constructor Description IntegerAttribute(Dictionary dictionary, int vendorId, byte type, byte[] data)
IntegerAttribute(Dictionary dictionary, int vendorId, byte type, int value)
IntegerAttribute(Dictionary dictionary, int vendorId, byte type, java.lang.String value)
-
Method Summary
Modifier and Type Method Description int
getValueInt()
Returns the int value of this attribute.long
getValueLong()
Returns the long value of this attribute.java.lang.String
getValueString()
Returns the value of this attribute as a string.Methods inherited from class org.tinyradius.attribute.RadiusAttribute
equals, getAttributeKey, getAttributeMap, getAttributeType, getDictionary, getType, getValue, getVendorId, hashCode, toByteArray, toString
-
Constructor Details
-
Method Details
-
getValueLong
public long getValueLong()Returns the long value of this attribute.- Returns:
- a long
-
getValueInt
public int getValueInt()Returns the int value of this attribute.- Returns:
- a int
-
getValueString
public java.lang.String getValueString()Returns the value of this attribute as a string. Tries to resolve enumerations.- Overrides:
getValueString
in classRadiusAttribute
- Returns:
- value of this attribute as a hex string.
-