Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Class JBoolean #33

Open
nsanitate opened this issue Jul 28, 2017 · 0 comments
Open

Class JBoolean #33

nsanitate opened this issue Jul 28, 2017 · 0 comments

Comments

@nsanitate
Copy link
Member

Implement class JBoolean, porting of the Java class java.lang.Boolean.

The Boolean class wraps a value of the primitive type boolean in an object. An object of type Boolean contains a single field whose type is boolean.

Expected Behavior

The Boolean object corresponding to the primitive value false.

  • public static field TRUE: JBoolean

The Boolean object corresponding to the primitive value true.

  • public static field TYPE: JClass<JBoolean>

The Class object representing the primitive type boolean.

  • public 1-params constructor constructor(value: Jboolean)

Allocates a Boolean object representing the value argument.

  • public 1-params constructor constructor(s: JString)

Allocates a Boolean object representing the value true if the string argument is not null and is equal, ignoring case, to the string "true".

  • public static method compare(x: Jboolean, y: Jboolean): Jint

Compares two boolean values.

  • public static method getBoolean(name: JString): Jboolean

Returns true if and only if the system property named by the argument exists and is equal to the string "true".

  • public static method hashCode(value: Jboolean): Jint

Returns a hash code for a boolean value; compatible with Boolean.hashCode().

  • public static method logicalAnd(a: Jboolean, b: Jboolean): Jboolean

Returns the result of applying the logical AND operator to the specified boolean operands.

  • public static method logicalOr(a: Jboolean, b: Jboolean): Jboolean

Returns the result of applying the logical OR operator to the specified boolean operands.

  • public static method logicalXor(a: Jboolean, b: Jboolean): Jboolean

Returns the result of applying the logical XOR operator to the specified boolean operands.

  • public static method parseBoolean(s: JString): Jboolean

Parses the string argument as a boolean.

  • public static method toString(b: Jboolean): JString

Returns a String object representing the specified boolean.

  • public static method valueOf(b: Jboolean): JBoolean

Returns a Boolean instance representing the specified boolean value.

  • public static method valueOf(s: JString): JBoolean

Returns a Boolean with a value represented by the specified string.

  • public method booleanValue(): Jboolean

Returns the value of this Boolean object as a boolean primitive.

  • public method compareTo(b: JBoolean): Jint

Compares this Boolean instance with another.

  • public method equals(obj: JObject): Jboolean

Returns true if and only if the argument is not null and is a Boolean object that represents the same boolean value as this object.

  • public method hashCode(): Jint

Returns a hash code for this Boolean object.

  • public method toString(): JString

Returns a String object representing this Boolean's value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant