
lt.lang.implicit.RichBool Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of latte-compiler Show documentation
Show all versions of latte-compiler Show documentation
The latte-lang compiler project, which contains compiler and runtime required library.
The newest version!
package lt.lang.implicit;
import lt.runtime.LtRuntime;
/**
* rich Bool
*/
public class RichBool {
private Boolean b;
public RichBool(Boolean b) {
this.b = b;
}
public boolean logicNot() throws Throwable {
return !b;
}
/*
* ============
* add
* ============
*/
// none
/*
* ============
* and
* ============
*/
public boolean and(Boolean b) {
return this.b & b;
}
public boolean and(Object o) throws Throwable {
return this.b & LtRuntime.castToBool(o);
}
/*
* ============
* or
* ============
*/
public boolean or(Boolean b) {
return this.b | b;
}
public boolean or(Object o) throws Throwable {
return this.b | LtRuntime.castToBool(o);
}
/*
* ============
* divide
* ============
*/
// none
/*
* ============
* ge
* ============
*/
// none
/*
* ============
* gt
* ============
*/
// none
/*
* ============
* le
* ============
*/
// none
/*
* ============
* lt
* ============
*/
// none
/*
* ============
* multiply
* ============
*/
// none
/*
* ============
* remainder
* ============
*/
// none
/*
* ============
* shiftLeft
* ============
*/
// none
/*
* ============
* shiftRight
* ============
*/
// none
/*
* ============
* subtract
* ============
*/
// none
/*
* ====================
* unsignedShiftRight
* ====================
*/
// none
/*
* ============
* xor
* ============
*/
public boolean xor(Boolean b) throws Throwable {
return this.b ^ b;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy