Skip to content

Instantly share code, notes, and snippets.

@antonijn
Last active January 1, 2016 10:59
Show Gist options
  • Save antonijn/8135382 to your computer and use it in GitHub Desktop.
Save antonijn/8135382 to your computer and use it in GitHub Desktop.
Base:
class boh.std.Object
this();
virtual boh.std.Type getType();
virtual long hash();
virtual boolean equals(Object other);
virtual boh.std.String toString();
static boolean valEquals(boh.std.Object l, boh.std.Object r);
static T cast<T>();
static boolean tryCast<T>(ref T to);
static boolean is<T>(boh.std.Object o);
static boolean is(boh.std.Object o, boh.std.Type t);
Reflection:
final class boh.std.Package
boh.std.String getName();
boh.std.Package getParent();
static boh.std.Package GLOBAL = null;
enum boh.std.Modifiers
PRIVATE
PROTECTED
PACKAGE
PUBLIC
STATIC
FINAL
VIRTUAL
ABSTRACT
OVERRIDE
NOCONTEXT
class boh.std.Variable
boh.std.String getName();
boh.std.Modifiers getModifiers();
boh.std.Type getType();
interface boh.std.IMember
boh.std.Type getOwner();
boh.std.String getName();
final class boh.std.Field extends boh.std.Variable implements boh.std.IMember
boh.std.Type getOwner();
void setValue(boh.std.Object instance, boh.std.Object value);
boh.std.Object getValue(boh.std.Object instance);
final class boh.std.Method implements boh.std.IMember
boh.std.Type getOwner();
boh.std.String getName();
boh.std.Modifiers getModifiers();
boh.std.Type getReturnType();
boh.std.String<boh.std.Variable> getParameters();
boolean isConstructor();
boolean isIndexer();
boolean isOperator();
boh.std.Object call(boh.std.Object instance, boh.std.Object[] parameters);
class boh.std.Type
boh.std.String getName();
boh.std.String getFullName();
boh.std.Package getPackage();
boh.std.String<boh.std.Method> getMethods();
boh.std.String<boh.std.Method> getMethods(boh.std.String name);
boh.std.Method getMethod(boh.std.String name, boh.std.Type[] paramTypes);
boh.std.String<boh.std.IMember> getMembers();
class boh.std.ClassLikeType extends boh.std.Type
boh.std.String<boh.std.Interface> getImplements();
boh.std.String<boh.std.Field> getFields();
boh.std.Field getField(boh.std.String name);
final class boh.std.Class extends boh.std.ClassLikeType
boh.std.Class getSuper();
final class boh.std.Struct extends boh.std.ClassLikeType
final class boh.std.Enumerator
boh.std.String getName();
long getValue();
final class boh.std.Enum extends boh.std.Type
boh.std.String<boh.std.Enumerator> getEnumerators();
boh.std.Enumerator getEnumerator(boh.std.String name);
final class boh.std.Primitive extends boh.std.ClassLikeType
final class boh.std.Interface extends boh.std.Type
boh.std.String<boh.std.Interface> getImplements();
Random:
interface boh.std.IRng<T>
T next();
class boh.std.RandomMT<T> implements boh.std.IRng<T>
this(int wordSize, int stateSize, int shiftSize, int maskBits, T xorMask, int u, T d, T s, T b, int t, T c, int l, T multiplier, T seed);
T next();
final class boh.std.RandomMT19937 extends boh.std.RandomMT<int>
this(int seed);
final class boh.std.RandomMT19937_64 extends boh.std.RandomMT<long>
this(long seed);
class boh.std.RandomLGC<T> implements boh.std.IRng<T>
this(T seed, T m, T a, T c, );
T next();
final class boh.std.DefaultRandomLGC32 extends boh.std.RandomLGC<int>
this(int seed);
static final int M = (1 << 31);
static final int A = 1103515245;
static final int C = 12345;
static final int MASK = int.MAX & ~(3 << 31);
final class boh.std.DefaultRandomLGC64 extends boh.std.RandomLGC<long>
this(int seed);
static final long M = long.MAX;
static final long A = 6364136223846793005L;
static final long C = 1442695040888963407L;
static final long MASK = long.MAX;
final class boh.std.UniformIntDistribution<T>
this(T min, T max);
T next(boh.std.IRng<T> rng);
final class boh.std.UniformRealDistribution<T>
this(T min, T max);
T next<U>(boh.std.IRng<U> rng);
final class boh.std.NormalDistribution<T>
this(T mean, T stdDev);
T next<U>(boh.std.IRng<U> rng);
final class boh.std.PseudoUniformDistribution<T>
this(T min, T max);
T next<U>(boh.std.IRng<U> rng);
final class boh.std.SimpleRandom
this();
this(long seed);
byte nextByte();
int nextInt();
int nextInt(int min, int max);
long nextLong();
long nextLong(long min, long max);
float nextFloat();
float nextFloat(float min, float max);
double nextDouble();
double nextDouble(double min, double max);
boolean nextBoolean();
Threading:
final class boh.std.Thread
this(void() f);
this(void(Object) f)
void start();
void start(Object data);
void join();
void abort();
void suspend();
void resume();
static void sleep(long ms);
static boh.std.Thread current();
final class boh.std.Mutex
this();
void lock();
void unlock();
final class boh.std.WaitHandle
this();
void wait();
void notify();
static void notifyAll();
Collections:
interface boh.std.IIterator<T>
T current();
boolean next();
boolean previous();
void reset();
void moveLast();
abstract class boh.std.Collection<T>
abstract boh.std.IIterator<T> iterator();
virtual boolean contains(boolean(T) item);
virtual boolean contains(boolean(T) pred);
virtual int getIndex(boolean(T) pred);
virtual boh.std.Collection<T> where(boolean(T) pred);
virtual boh.std.Collection<U> select<U>(U(T) f);
virtual boh.std.Collection<U> cast<U>();
virtual boh.std.Collection<U> selectMany<U>(Collection<U>(T) sel);
virtual T first();
virtual T first(boolean(T) pred);
virtual T last();
virtual T last(boolean(T) pred);
virtual T only();
virtual T only(boolean(T) pred);
virtual T firstOrDefault();
virtual T firstOrDefault(boolean(T) pred);
virtual T lastOrDefault();
virtual T lastOrDefault(boolean(T) pred);
virtual T onlyOrDefault();
virtual T onlyOrDefault(boolean(T) pred);
virtual boh.std.Collection<T> quickSort(int(T) sel);
virtual int count();
virtual int count(boolean(T) pred);
virtual boh.std.Array<T> toArray();
virtual boh.std.List<T> toList();
abstract class boh.std.IndexedCollection<T>
virtual int indexOf(T item);
virtual int[] indicesOf(T item);
virtual int lastIndexOf(T item);
abstract T indexer[int idx]();
abstract int size();
override T first();
override T first(boolean(T) pred);
override T last();
override T last(boolean(T) pred);
override T only();
override T only(boolean(T) pred);
override T firstOrDefault();
override T firstOrDefault(boolean(T) pred);
override T lastOrDefault();
override T lastOrDefault(boolean(T) pred);
override T onlyOrDefault();
override T onlyOrDefault(boolean(T) pred);
override int count();
override int count(boolean(T) pred);
override int getIndex(boolean(T) pred);
abstract class boh.std.MutableIndexedCollection<T> extends IndexedCollection
abstract T indexer[int idx](T item);
virtual void move(int src, int dest, int len);
virtual void swap(int a, int b);
virtual void copyTo(boh.std.MutableIndexedCollection<T> other, int idx);
final class boh.std.Array<T> extends boh.std.MutableIndexedCollection<T>
this();
this(int size);
override int size();
override boh.std.IIterator<T> iterator();
override T this[int idx]();
override T this[int idx](T value);
void resize(int nsize);
final class boh.std.List<T> extends boh.std.MutableIndexedCollection<T>
this();
this(int capacity);
int capacity();
override int size();
boh.std.IIterator<T> iterator();
boh.std.Query<T> query();
void add(T item);
void add(boh.std.IIterable<T> items);
void remove(T item);
void removeAt(int idx);
void removeAt(int idx, int amount);
void clear();
void removeAll(boolean(T) condition);
void removeFirst(boolean(T) condition);
void grow(int amount);
void shrink(int amount);
override T this[int idx]();
override T this[int idx](T value);
static final int INITIAL_CAPACITY = 13;
final class boh.std.KeyValue<TKey, TValue>
this(TKey key, TValue value);
TKey getKey();
TValue getValue();
long keyHash();
final class boh.std.HashTable<TKey, TValue> extends boh.std.IndexedCollection<boh.std.KeyValue<TKey, TValue>>
this()
this(boh.std.Collection<boh.std.KeyValue<TKey, TValue>> keyValues);
override boh.std.IIterator<T> iterator();
override int size();
void add(TKey key, TValue value);
void remove(TKey key, TValue value);
boolean containsKey(TKey key);
boolean containsValue(TValue value);
boh.std.Collection<TKey> getKeys();
boh.std.Collection<TValue> getValues();
TValue this[TKey key]();
TValue this[TKey key](TValue value);
override boh.std.KeyValue<TKey, TValue> this[int idx]();
override boh.std.KeyValue<TKey, TValue> this[int idx](boh.std.KeyValue<TKey, TValue> value);
enum boh.std.StackMode
FROM_BASE
FROM_TOP
final class boh.std.Stack<T> implements boh.std.MutableIndexedCollection<T>
private boh.std.List<T> internal;
private boh.std.Stack<StackMode> modes;
private this(boolean modestack);
this();
this(int capacity);
int capacity();
override int size();
void push(T item);
T pop();
T top();
T base();
void pushMode(StackMode mode);
StackMode popMode();
StackMode getMode();
override T this[int offset]();
override T this[int offset](T value);
static final int INITIAL_CAPACITY = 13;
final class boh.std.Queue<T> extends boh.std.MutableIndexedCollection<T>
private boh.std.List<T> internal;
private boh.std.Stack<StackMode> modes;
private this(boolean modestack);
this();
this(int capacity);
int capacity();
override int size();
void push(T item);
T pop();
T top();
T base();
void pushMode(StackMode mode);
StackMode popMode();
StackMode getMode();
override T this[int offset]();
override T this[int offset](T value);
static final int INITIAL_CAPACITY = 13;
final class boh.std.String<T = char> extends boh.std.<T>
this();
this(int size);
this(boh.std.Collection<T> base);
override int size();
override boh.std.IIterator<T> iterator();
override T this[int idx]();
final class boh.std.Tuple<T1, T2>
this(T1 item1, T2 item2);
final T1 item1;
final T2 item2;
final class boh.std.Tuple<T1, T2, T3>
this(T1 item1, T2 item2, T3 item3);
final T1 item1;
final T2 item2;
final T3 item3;
final class boh.std.Tuple<T1, T2, T3, T4>
this(T1 item1, T2 item2, T3 item3, T4 item4);
final T1 item1;
final T2 item2;
final T3 item3;
final T4 item4;
final class boh.std.Tuple<T1, T2, T3, T4, T5>
this(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5);
final T1 item1;
final T2 item2;
final T3 item3;
final T4 item4;
final T5 item5;
final class boh.std.Tuple<T1, T2, T3, T4, T5, T6>
this(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6);
final T1 item1;
final T2 item2;
final T3 item3;
final T4 item4;
final T5 item5;
final T6 item6;
final class boh.std.Tuple<T1, T2, T3, T4, T5, T6, T7>
this(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7);
final T1 item1;
final T2 item2;
final T3 item3;
final T4 item4;
final T5 item5;
final T6 item6;
final T7 item7;
final class boh.std.Tuple<T1, T2, T3, T4, T5, T6, T7, T8>
this(T1 item1, T2 item2, T3 item3, T4 item4, T5 item5, T6 item6, T7 item7, T8 item8);
final T1 item1;
final T2 item2;
final T3 item3;
final T4 item4;
final T5 item5;
final T6 item6;
final T7 item7;
final T8 item8;
Text:
struct boh.std.HumanChar
this(int[] cps);
boh.std.IndexedCollection<int> getUnicode();
override boolean equals(boh.std.Object other);
final class boh.std.HumanText extends boh.std.IndexedCollection<boh.std.HumanChar>
this(boh.std.String text);
override boh.std.IIterator<boh.std.HumanChar> iterator();
override boolean equals(boh.std.Object other);
IO:
abstract class boh.std.io.TextWriter
abstract void write(char ch)
void write(boh.std.Object o);
void writeln(boh.std.Object o);
void writefrmt(boh.std.String frmt, Object[] args...);
void writefrmtln(boh.std.String frmt, Object[] args...);
abstract class boh.std.io.TextReader
abstract int readchar();
abstract boh.std.String readln();
final class boh.std.io.StreamWriter extends boh.std.io.TextWriter
this(boh.std.io.Stream output)
override void write(char ch)
final class boh.std.io.StreamReader extends boh.std.io.TextReader
this(boh.std.io.Stream input)
override int readchar();
override boh.std.String readln();
final class boh.std.io.StringWriter extends boh.std.io.TextWriter
this()
this(int buffer);
override void write(char ch);
final class boh.std.io.StringReader extends boh.std.io.TextReader
this(boh.std.String s);
override int readchar();
override boh.std.String readln();
final class boh.std.io.Directory
static boh.std.io.File rel(boh.std.String[] path...);
static boh.std.io.File abs(boh.std.String[] path...);
boolean exists();
boh.std.Collection<boh.std.io.File> getFiles();
boh.std.io.Directory getAbove();
final class boh.std.io.File
static boh.std.io.File rel(boh.std.String[] path...);
static boh.std.io.File abs(boh.std.String[] path...);
boolean exists();
int size();
boh.std.io.Directory getAbove();
abstract class boh.std.io.Stream implements boh.std.IDisposable
abstract boolean canRead();
abstract boolean canWrite();
abstract boolean canSeek();
abstract int size();
abstract int getPosition();
abstract void flush();
abstract int readByte();
abstract int peek();
abstract int read(byte[] buf, int offset, int count);
abstract int write(byte[] buf, int offset, int count);
abstract int writeByte(byte b);
final class FileStream extends Stream
this(VoidPtr cHandle);
this(boh.std.io.File f, boh.std.io.FileMode mode);
override boolean canRead();
override boolean canWrite();
override boolean canSeek();
override int size();
override int getPosition();
override void flush();
override int readByte();
override int peek();
override int read(byte[] buf, int offset, int count);
override int write(byte[] buf, int offset, int count);
override int writeByte(byte b);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment