net.fractalkiss.util
Class Util
java.lang.Object
|
+--net.fractalkiss.util.Util
- Direct Known Subclasses:
- Fragger, FrameCube, FramePlane
- public class Util
- extends java.lang.Object
Base Utility class
Constructor Summary |
Util()
|
Method Summary |
static char[] |
and(char[] sb,
char[] xor)
|
static void |
fill02(char[][] plane,
int x,
int y)
fills 2D char array with zeros |
static void |
fill03(char[][][] cube,
int x,
int y,
int z)
fills 3D char array with zeros |
static char[] |
nand(char[] sb,
char[] xor)
performs NAND operation (NotAnd), it's the commutative opposite of andNot,
but sounds and writes shorter. |
static char[] |
or(char[] sb,
char[] xor)
|
static void |
writeBytes(java.io.OutputStream ou,
char[] level)
Makes sure chars are written without encoding |
static void |
writePlane(char[][] plane,
java.lang.String name,
int res)
writes plane to name file |
static char[] |
xor(char[] a,
char[] b)
per byte XOR of two char arrays |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Util
public Util()
nand
public static char[] nand(char[] sb,
char[] xor)
- performs NAND operation (NotAnd), it's the commutative opposite of andNot,
but sounds and writes shorter. The thing of notice, however is that NAND
is not commutative, xor mask is negated and then compared to presentation
- Parameters:
sb
- presentationxor
- xor mask- Returns:
- nand result, essentially fragmented sb
and
public static char[] and(char[] sb,
char[] xor)
or
public static char[] or(char[] sb,
char[] xor)
xor
public static char[] xor(char[] a,
char[] b)
- per byte XOR of two char arrays
- Parameters:
a
- array 1b
- array 2- Returns:
- xor result
fill02
public static void fill02(char[][] plane,
int x,
int y)
- fills 2D char array with zeros
- Parameters:
plane
- char array to fillx
- size of first indexy
- size of second index
fill03
public static void fill03(char[][][] cube,
int x,
int y,
int z)
- fills 3D char array with zeros
- Parameters:
cube
- 3D char arrayx
- size of first indexy
- size of second indexz
- size of third index
writeBytes
public static void writeBytes(java.io.OutputStream ou,
char[] level)
- Makes sure chars are written without encoding
- Parameters:
ou
- outputstreamlevel
- fragmentation level
writePlane
public static void writePlane(char[][] plane,
java.lang.String name,
int res)
- writes
plane
to name
file
- Parameters:
plane
- 2D char arrayname
- file nameres
- size of cube sides