@Override
        public IndexedTensor build() {
            IndexedTensor tensor = new IndexedFloatTensor(type, sizes(), values);
            // prevent further modification
            values = null;
            return tensor;
        }
A bound builder can create the float array directly
vespajlib/src/main/java/com/yahoo/tensor/IndexedFloatTensor.java