tesuji.games.go
Class UniqueList
java.lang.Object
|
+--tesuji.games.go.UniqueList
- All Implemented Interfaces:
- FlyWeight
- public class UniqueList
- extends java.lang.Object
- implements FlyWeight
This class acts just like IntStack, except that it won't
allow the same value in the list more than once.
The restriction is that the values must be within the range
of 0 and GoArray.MAX.
Typically this class is used to store (small) lists of
coordinates on a go-board.
Creation date: (17-May-01 2:26:28 PM)
Product: Tesuji Software Go Library.
Copyright (c) 2001 Tesuji Software B.V.
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, and/or sell copies of the Software, and to permit persons
to whom the Software is furnished to do so, provided that the above
copyright notice(s) and this permission notice appear in all copies of
the Software and that both the above copyright notice(s) and this
permission notice appear in supporting documentation.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Except as contained in this notice, the name of a Tesuji Software
shall not be used in advertising or otherwise to promote the sale, use
or other dealings in this Software without prior written authorization
of Tesuji Software.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UniqueList
public UniqueList()
UniqueList
public UniqueList(java.util.Stack ownerStack)
setMask
public static void setMask(byte[] theMask)
add
public boolean add(int xy)
hasMember
public boolean hasMember(int xy)
isEmpty
public boolean isEmpty()
getSize
public int getSize()
getIterator
public Cursor getIterator()
add
public void add(IntStack otherStack)
clear
public void clear()
get
public int get(int index)
recycle
public final void recycle()
- Specified by:
recycle
in interface FlyWeight
remove
public void remove(int xy)
setSize
public void setSize(int size)