|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface CMIntegerGrouper
This class represents an efficient representation of a group of room numbers with optional xy grid coords. It maintains a compact list by ordering the digits and then tagging the groups without missing members.
| Field Summary | |
|---|---|
static long |
GRID_FLAGL
Whether this number denotes the beginning of a grouping. |
static int |
NEXT_BITS
a mask for room number values |
static long |
NEXT_BITSL
a mask for room number values |
static int |
NEXT_FLAG
Whether this number denotes the beginning of a grouping. |
static long |
NEXT_FLAGL
Whether this number denotes the beginning of a grouping. |
| Method Summary | |
|---|---|
CMIntegerGrouper |
add(CMIntegerGrouper grp)
Adds a group of room numbers |
CMIntegerGrouper |
add(long x)
Adds the room number |
void |
addx(int x)
Adds the single digit |
void |
addy(long x)
Adds the single digit |
int[] |
allPrimaryRoomNums()
Return all primary raw room numbers. |
long[] |
allRoomNums()
Return all raw room numbers, with grid locales encoded. |
boolean |
contains(long x)
Returns whether this list contains the given coded room number. |
long[] |
packedGridRoomNums()
Return all packed grid room numbers, with grid locales encoded. |
int[] |
packedRoomNums()
Return all packed grid room numbers, with grid locales encoded. |
CMIntegerGrouper |
parseText(java.lang.String txt)
Creates a nice storage of integers from a saved string. |
long |
random()
Return a random coded room number from this set. |
CMIntegerGrouper |
remove(CMIntegerGrouper grp)
Removes the room number |
CMIntegerGrouper |
remove(long x)
Removes the room number |
int |
roomCount()
The total number of digits represented by this grouping. |
java.lang.String |
text()
This set of integers as a savable string. |
| Methods inherited from interface com.planet_ink.coffee_mud.core.interfaces.CMObject |
|---|
copyOf, ID, initializeClass, newInstance |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final int NEXT_FLAG
static final int NEXT_BITS
static final long NEXT_FLAGL
static final long GRID_FLAGL
static final long NEXT_BITSL
| Method Detail |
|---|
java.lang.String text()
long random()
long[] allRoomNums()
int[] allPrimaryRoomNums()
long[] packedGridRoomNums()
int[] packedRoomNums()
CMIntegerGrouper parseText(java.lang.String txt)
txt - the list as a string
boolean contains(long x)
x - the number to look for, coded as a room number
int roomCount()
CMIntegerGrouper remove(long x)
x - the coded digit pair to remove.
CMIntegerGrouper add(long x)
x - the coded digit pair to add.
CMIntegerGrouper remove(CMIntegerGrouper grp)
grp - the coded digit pair to remove.
CMIntegerGrouper add(CMIntegerGrouper grp)
grp - the coded digit pairs to add.
void addy(long x)
x - the single digit to add.void addx(int x)
x - the single digit to add.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||