}
GenericIndexed<ImmutableBitmap> bitmaps;
if (nullSet != null) {
final ImmutableBitmap theNullSet = bitmapFactory.makeImmutableBitmap(nullSet);
if (bumpDictionary) {
bitmaps = GenericIndexed.fromIterable(
Iterables.concat(
Arrays.asList(theNullSet),
Iterables.transform(
mutableBitmaps,
new Function<MutableBitmap, ImmutableBitmap>()
{
@Override
public ImmutableBitmap apply(MutableBitmap input)
{
return bitmapFactory.makeImmutableBitmap(input);
}
}
)
),
bitmapSerdeFactory.getObjectStrategy()
);
} else {
Iterable<ImmutableBitmap> immutableBitmaps = Iterables.transform(
mutableBitmaps,
new Function<MutableBitmap, ImmutableBitmap>()
{
@Override
public ImmutableBitmap apply(MutableBitmap input)
{
return bitmapFactory.makeImmutableBitmap(input);
}
}
);
bitmaps = GenericIndexed.fromIterable(
Iterables.concat(
Arrays.asList(
theNullSet.union(Iterables.getFirst(immutableBitmaps, null))
),
Iterables.skip(immutableBitmaps, 1)
),
bitmapSerdeFactory.getObjectStrategy()
);