public ArrayList<String> available() { ArrayList<String> scenes = new ArrayList<String>(); FileHandle[] files = Gdx.files.internal("bdx/scenes/").list("bdx"); for (FileHandle file : files) { scenes.add(file.name().replace(".bdx", "")); } return scenes; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, FileHandle struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetId()) { optionals.set(0); } if (struct.isSetFlags()) { optionals.set(1); } if (struct.isSetPartition()) { optionals.set(2); } oprot.writeBitSet(optionals, 3); if (struct.isSetId()) { oprot.writeI64(struct.id); } if (struct.isSetFlags()) { oprot.writeI32(struct.flags); } if (struct.isSetPartition()) { oprot.writeByte(struct.partition); } }
@Override public int compareTo(FileHandle other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId()); if (lastComparison != 0) { return lastComparison; } if (isSetId()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFlags()).compareTo(other.isSetFlags()); if (lastComparison != 0) { return lastComparison; } if (isSetFlags()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flags, other.flags); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetPartition()).compareTo(other.isSetPartition()); if (lastComparison != 0) { return lastComparison; } if (isSetPartition()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.partition, other.partition); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, FileHandle struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(ID_FIELD_DESC); oprot.writeI64(struct.id); oprot.writeFieldEnd(); oprot.writeFieldBegin(FLAGS_FIELD_DESC); oprot.writeI32(struct.flags); oprot.writeFieldEnd(); oprot.writeFieldBegin(PARTITION_FIELD_DESC); oprot.writeByte(struct.partition); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); }
public void read(org.apache.thrift.protocol.TProtocol iprot, FileHandle struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // ID if (schemeField.type == org.apache.thrift.protocol.TType.I64) { struct.id = iprot.readI64(); struct.setIdIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // FLAGS if (schemeField.type == org.apache.thrift.protocol.TType.I32) { struct.flags = iprot.readI32(); struct.setFlagsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // PARTITION if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) { struct.partition = iprot.readByte(); struct.setPartitionIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); }
@Override public void read(org.apache.thrift.protocol.TProtocol prot, FileHandle struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(3); if (incoming.get(0)) { struct.id = iprot.readI64(); struct.setIdIsSet(true); } if (incoming.get(1)) { struct.flags = iprot.readI32(); struct.setFlagsIsSet(true); } if (incoming.get(2)) { struct.partition = iprot.readByte(); struct.setPartitionIsSet(true); } }