1 11 12 13 package com.sun.jmx.snmp; 14 15 16 17 25 26 public abstract class SnmpUnsignedInt extends SnmpInt { 27 28 31 public static final long MAX_VALUE = 0x0ffffffffL; 32 33 41 public SnmpUnsignedInt(int v) throws IllegalArgumentException { 42 super(v); 43 } 44 45 51 public SnmpUnsignedInt(Integer v) throws IllegalArgumentException { 52 super(v); 53 } 54 55 61 public SnmpUnsignedInt(long v) throws IllegalArgumentException { 62 super(v); 63 } 64 65 71 public SnmpUnsignedInt(Long v) throws IllegalArgumentException { 72 super(v); 73 } 74 75 81 public String getTypeName() { 82 return name ; 83 } 84 85 89 boolean isInitValueValid(int v) { 90 if ((v < 0) || (v > SnmpUnsignedInt.MAX_VALUE)) { 91 return false; 92 } 93 return true; 94 } 95 96 100 boolean isInitValueValid(long v) { 101 if ((v < 0) || (v > SnmpUnsignedInt.MAX_VALUE)) { 102 return false; 103 } 104 return true; 105 } 106 107 112 final static String name = "Unsigned32" ; 113 } 114 | Popular Tags |