move this back

This commit is contained in:
Taah
2022-05-04 05:20:29 -07:00
parent a24aa6a962
commit 7d0f3618c9
4 changed files with 9 additions and 9 deletions

View File

@ -1,33 +0,0 @@
package dev.plex.toml;
import java.util.Collection;
import static dev.plex.toml.ValueWriters.WRITERS;
class TableArrayValueWriter extends dev.plex.toml.ArrayValueWriter
{
static final dev.plex.toml.ValueWriter TABLE_ARRAY_VALUE_WRITER = new TableArrayValueWriter();
@Override
public boolean canWrite(Object value) {
return isArrayish(value) && !isArrayOfPrimitive(value);
}
@Override
public void write(Object from, dev.plex.toml.WriterContext context) {
Collection<?> values = normalize(from);
dev.plex.toml.WriterContext subContext = context.pushTableFromArray();
for (Object value : values) {
WRITERS.findWriterFor(value).write(value, subContext);
}
}
private TableArrayValueWriter() {}
@Override
public String toString() {
return "table-array";
}
}