42 lines
1.4 KiB
Java
42 lines
1.4 KiB
Java
// automatically generated by the FlatBuffers compiler, do not modify
|
|
|
|
import com.google.flatbuffers.FlatBufferBuilder;
|
|
|
|
public class CharacterUnion {
|
|
private byte type;
|
|
private Object value;
|
|
|
|
public byte getType() { return type; }
|
|
|
|
public void setType(byte type) { this.type = type; }
|
|
|
|
public Object getValue() { return value; }
|
|
|
|
public void setValue(Object value) { this.value = value; }
|
|
|
|
public CharacterUnion() {
|
|
this.type = Character.NONE;
|
|
this.value = null;
|
|
}
|
|
|
|
public AttackerT asMuLan() { return (AttackerT) value; }
|
|
public RapunzelT asRapunzel() { return (RapunzelT) value; }
|
|
public BookReaderT asBelle() { return (BookReaderT) value; }
|
|
public BookReaderT asBookFan() { return (BookReaderT) value; }
|
|
public String asOther() { return (String) value; }
|
|
public String asUnused() { return (String) value; }
|
|
|
|
public static int pack(FlatBufferBuilder builder, CharacterUnion _o) {
|
|
switch (_o.type) {
|
|
case Character.MuLan: return Attacker.pack(builder, _o.asMuLan());
|
|
case Character.Rapunzel: return Rapunzel.pack(builder, _o.asRapunzel());
|
|
case Character.Belle: return BookReader.pack(builder, _o.asBelle());
|
|
case Character.BookFan: return BookReader.pack(builder, _o.asBookFan());
|
|
case Character.Other: return builder.createString(_o.asOther());
|
|
case Character.Unused: return builder.createString(_o.asUnused());
|
|
default: return 0;
|
|
}
|
|
}
|
|
}
|
|
|