Path: blob/aarch64-shenandoah-jdk8u272-b10/jdk/src/share/classes/com/sun/jmx/snmp/SnmpCounter.java
38924 views
/*1* Copyright (c) 1997, 2007, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/242526package com.sun.jmx.snmp;27282930/**31* Represents an SNMP counter.32*33* <p><b>This API is a Sun Microsystems internal API and is subject34* to change without notice.</b></p>35*/3637public class SnmpCounter extends SnmpUnsignedInt {38private static final long serialVersionUID = 4655264728839396879L;3940// CONSTRUCTORS41//-------------42/**43* Constructs a new <CODE>SnmpCounter</CODE> from the specified integer value.44* @param v The initialization value.45* @exception IllegalArgumentException The specified value is negative46* or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.47*/48public SnmpCounter(int v) throws IllegalArgumentException {49super(v) ;50}5152/**53* Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Integer</CODE> value.54* @param v The initialization value.55* @exception IllegalArgumentException The specified value is negative56* or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.57*/58public SnmpCounter(Integer v) throws IllegalArgumentException {59super(v) ;60}6162/**63* Constructs a new <CODE>SnmpCounter</CODE> from the specified long value.64* @param v The initialization value.65* @exception IllegalArgumentException The specified value is negative66* or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.67*/68public SnmpCounter(long v) throws IllegalArgumentException {69super(v) ;70}7172/**73* Constructs a new <CODE>SnmpCounter</CODE> from the specified <CODE>Long</CODE> value.74* @param v The initialization value.75* @exception IllegalArgumentException The specified value is negative76* or larger than {@link SnmpUnsignedInt#MAX_VALUE SnmpUnsignedInt.MAX_VALUE}.77*/78public SnmpCounter(Long v) throws IllegalArgumentException {79super(v) ;80}8182// PUBLIC METHODS83//---------------84/**85* Returns a textual description of the type object.86* @return ASN.1 textual description.87*/88final public String getTypeName() {89return name ;90}9192// VARIABLES93//----------94/**95* Name of the type.96*/97final static String name = "Counter32" ;98}99100101