// Path: src/main/java/com/urbanairship/datacube/CSerializable.java
// public interface CSerializable {
//     byte[] serialize();
// }
// 
// Path: src/main/java/com/urbanairship/datacube/serializables/BooleanSerializable.java
// public class BooleanSerializable implements CSerializable {
//     private final boolean bool;
//     private static final byte[] FALSE_SERIAL = new byte[]{0};
//     private static final byte[] TRUE_SERIAL = new byte[]{1};
// 
//     public BooleanSerializable(boolean bool) {
//         this.bool = bool;
//     }
// 
//     @Override
//     public byte[] serialize() {
//         return staticSerialize(bool);
//     }
// 
//     public static byte[] staticSerialize(boolean b) {
//         if (b) {
//             return TRUE_SERIAL;
//         } else {
//             return FALSE_SERIAL;
//         }
//     }
// }


import com.urbanairship.datacube.CSerializable;
import com.urbanairship.datacube.serializables.BooleanSerializable;
/*
Copyright 2012 Urban Airship and Contributors
*/

package com.urbanairship.datacube.bucketers;


/**
 * BooleanBucketer
 * You can use this bucketer for cases where:
 * - You have a cube coordinate that is boolean
 * - You want to store that boolean as a byte[0] for false or a byte[1] for true.
 */

public class BooleanBucketer extends AbstractIdentityBucketer<Boolean> {
    private static final BooleanBucketer instance = new BooleanBucketer();

    @Override
    public CSerializable makeSerializable(Boolean coordinateField) {
// Path: src/main/java/com/urbanairship/datacube/CSerializable.java
// public interface CSerializable {
//     byte[] serialize();
// }
// 
// Path: src/main/java/com/urbanairship/datacube/serializables/BooleanSerializable.java
// public class BooleanSerializable implements CSerializable {
//     private final boolean bool;
//     private static final byte[] FALSE_SERIAL = new byte[]{0};
//     private static final byte[] TRUE_SERIAL = new byte[]{1};
// 
//     public BooleanSerializable(boolean bool) {
//         this.bool = bool;
//     }
// 
//     @Override
//     public byte[] serialize() {
//         return staticSerialize(bool);
//     }
// 
//     public static byte[] staticSerialize(boolean b) {
//         if (b) {
//             return TRUE_SERIAL;
//         } else {
//             return FALSE_SERIAL;
//         }
//     }
// }


// Path: src/main/java/com/urbanairship/datacube/bucketers/BooleanBucketer.java
import com.urbanairship.datacube.CSerializable;
import com.urbanairship.datacube.serializables.BooleanSerializable;

/*
Copyright 2012 Urban Airship and Contributors
*/

package com.urbanairship.datacube.bucketers;


/**
 * BooleanBucketer
 * You can use this bucketer for cases where:
 * - You have a cube coordinate that is boolean
 * - You want to store that boolean as a byte[0] for false or a byte[1] for true.
 */

public class BooleanBucketer extends AbstractIdentityBucketer<Boolean> {
    private static final BooleanBucketer instance = new BooleanBucketer();

    @Override
    public CSerializable makeSerializable(Boolean coordinateField) {
        return new BooleanSerializable(coordinateField);