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 -(unchecked例外)如果
value小于或大于
upperBound扔
lowerBound。
public int getValue()
public boolean equals(Object object)
object不空。object是类integersyntax实例。object的价值是相等的。equals 方法重写,继承类
Object
object对象比较。
object等于这个整数属性真,否则为假。
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.