|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |
java.lang.Object | +--coins.alias.util.BriggsSet
Set of unsigned integers implemented using two arrays. It has constant time performance for search, insertion, deletion, and initialization (emptying) operations. Scanning all the elements takes time proportional to the size of the set. The largest integer (plus 1) that can enter the set has to be specified when instatiating this class, and the instatiation itself takes time proportional to the number specified.
コンストラクタの概要 | |
BriggsSet(int pSize)
Creates a new instance of BriggsSet |
メソッドの概要 | |
boolean |
deleteElement(int pElem)
Tries to delete the given element from this set. |
boolean |
findElement(int pElem)
Searches for the given element. |
boolean |
insertElement(int pElem)
Tries to insert the given element into this set. |
void |
makeSetEmpty()
Initializes the set. |
Scanner |
scanner()
Returns the scanner that iterates through this set. |
クラス java.lang.Object から継承したメソッド |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
コンストラクタの詳細 |
public BriggsSet(int pSize)
pSize
- the grand upper size, or the largest number
that can enter the set plus one.メソッドの詳細 |
public void makeSetEmpty()
public boolean findElement(int pElem)
pElem
- the element to search for.
public boolean insertElement(int pElem)
pElem
- the element to insert.
public boolean deleteElement(int pElem)
pElem
- the element to delete.
public Scanner scanner()
|
||||||||||
前のクラス 次のクラス | フレームあり フレームなし | |||||||||
概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド |