src/main/java/de/javakaffee/kryoserializers/guava/ImmutableTableSerializer.java
public static void registerSerializers(final Kryo kryo) {

        // ImmutableTable (abstract class)
        //  +- SparseImmutableTable
        //  |   SparseImmutableTable
        //  +- DenseImmutableTable
        //  |   Used when more than half of the cells have values
        //  +- SingletonImmutableTable
        //  |   Optimized for Table with only 1 element.

        final ImmutableTableSerializer serializer = new ImmutableTableSerializer();

        kryo.register(ImmutableTable.class, serializer); // ImmutableTable
        kryo.register(ImmutableTable.of().getClass(), serializer); // SparseImmutableTable
        kryo.register(ImmutableTable.of(1, 2, 3).getClass(), serializer);  // SingletonImmutableTable

        kryo.register(ImmutableTable.builder()
                .put("a", 1, 1)
                .put("b", 1, 1)
                .build().getClass(), serializer); // DenseImmutableTable

    }
public static void registerSerializers(final Kryo kryo) {

        // ImmutableTable (abstract class)
        //  +- SparseImmutableTable
        //  |   SparseImmutableTable
        //  +- DenseImmutableTable
        //  |   Used when more than half of the cells have values
        //  +- SingletonImmutableTable
        //  |   Optimized for Table with only 1 element.

        final ImmutableTableSerializer serializer = new ImmutableTableSerializer();

        kryo.register(ImmutableTable.class, serializer); // ImmutableTable
        kryo.register(ImmutableTable.of().getClass(), serializer); // SparseImmutableTable
        kryo.register(ImmutableTable.of(1, 2, 3).getClass(), serializer);  // SingletonImmutableTable

        kryo.register(ImmutableTable.builder()
                .put("a", 1, 1)
                .put("b", 1, 1)
                .build().getClass(), serializer); // DenseImmutableTable

    }
Creates a new {@link ImmutableTableSerializer} and registers its serializer.

@param kryo the {@link Kryo} instance to set the serializer on