public abstract class IntegerSyntax extends Object implements Serializable, Cloneable
在引擎盖下,整数属性只是一个整数。 您可以通过调用getValue()获取整数属性的整数值。 构造整数属性的整数值(见IntegerSyntax(int) )。 一旦构造,整数属性的值是不可变的。
| Modifier | Constructor and Description |
|---|---|
protected |
IntegerSyntax(int value)
使用给定的整数值构造一个新的整数属性。
|
protected |
IntegerSyntax(int value, int lowerBound, int upperBound)
使用给定的整数值构造一个新的整数属性,它必须在给定的范围内。
|
protected IntegerSyntax(int value)
value - 整数值。
protected IntegerSyntax(int value,
int lowerBound,
int upperBound)
value - 整数值。
lowerBound - 下限。
upperBound - 上限。
IllegalArgumentException - (未经检查的异常)如果
value小于
lowerBound或大于
upperBound 。
public int getValue()
public boolean equals(Object object)
object不为空。 object是IntegerSyntax类的一个实例。 object的值相等。 equals在
Object
object - 要比较的对象。
object等效于此整数属性,则为True,
object为false。
Object.hashCode() , HashMap
public int hashCode()
hashCode在
Object
Object.equals(java.lang.Object) ,
System.identityHashCode(java.lang.Object)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.