124 lines
3.1 KiB
Java
124 lines
3.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package javax.baja.sys;
|
|
|
|
import java.io.DataInput;
|
|
import java.io.DataOutput;
|
|
import java.io.IOException;
|
|
import javax.baja.data.BIDataValue;
|
|
import javax.baja.sys.BIComparable;
|
|
import javax.baja.sys.BObject;
|
|
import javax.baja.sys.BSimple;
|
|
import javax.baja.sys.Context;
|
|
import javax.baja.sys.Sys;
|
|
import javax.baja.sys.Type;
|
|
|
|
/*
|
|
* Illegal identifiers - consider using --renameillegalidents true
|
|
*/
|
|
public final class BString
|
|
extends BSimple
|
|
implements BIComparable,
|
|
BIDataValue {
|
|
public static final BString DEFAULT = new BString("");
|
|
public static final Type TYPE;
|
|
private String value;
|
|
static /* synthetic */ Class class$javax$baja$sys$BString;
|
|
|
|
public static final BString make(String string) {
|
|
if (string.equals("")) {
|
|
return DEFAULT;
|
|
}
|
|
return new BString(string);
|
|
}
|
|
|
|
public final String getString() {
|
|
return this.value;
|
|
}
|
|
|
|
public final int hashCode() {
|
|
return this.value.hashCode();
|
|
}
|
|
|
|
public static final boolean equals(String string, String string2) {
|
|
if (string == null) {
|
|
boolean bl = false;
|
|
if (string2 == null) {
|
|
bl = true;
|
|
}
|
|
return bl;
|
|
}
|
|
if (string2 == null) {
|
|
return false;
|
|
}
|
|
return string.equals(string2);
|
|
}
|
|
|
|
public final boolean equals(Object object) {
|
|
if (object instanceof BString) {
|
|
return this.value.equals(((BString)object).value);
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public final int compareTo(Object object) {
|
|
return this.value.compareTo(((BString)object).getString());
|
|
}
|
|
|
|
public final String toString(Context context) {
|
|
return this.value;
|
|
}
|
|
|
|
public final void encode(DataOutput dataOutput) throws IOException {
|
|
dataOutput.writeUTF(this.value);
|
|
}
|
|
|
|
public final BObject decode(DataInput dataInput) throws IOException {
|
|
String string = dataInput.readUTF();
|
|
return BString.make(string);
|
|
}
|
|
|
|
public final String encodeToString() throws IOException {
|
|
return this.value;
|
|
}
|
|
|
|
public final BObject decodeFromString(String string) throws IOException {
|
|
return BString.make(string);
|
|
}
|
|
|
|
public final BIDataValue toDataValue() {
|
|
return this;
|
|
}
|
|
|
|
public final Type getType() {
|
|
return TYPE;
|
|
}
|
|
|
|
static /* synthetic */ Class class(String string, boolean bl) {
|
|
try {
|
|
Class<?> clazz = Class.forName(string);
|
|
if (!bl) {
|
|
clazz = clazz.getComponentType();
|
|
}
|
|
return clazz;
|
|
}
|
|
catch (ClassNotFoundException classNotFoundException) {
|
|
throw new NoClassDefFoundError(classNotFoundException.getMessage());
|
|
}
|
|
}
|
|
|
|
private BString(String string) {
|
|
this.value = string;
|
|
}
|
|
|
|
static {
|
|
Class clazz = class$javax$baja$sys$BString;
|
|
if (clazz == null) {
|
|
clazz = class$javax$baja$sys$BString = BString.class("[Ljavax.baja.sys.BString;", false);
|
|
}
|
|
TYPE = Sys.loadType(clazz);
|
|
}
|
|
}
|
|
|