com.moandjiezana.toml.ArrayValueReader Maven / Gradle / Ivy
package com.moandjiezana.toml;
import static com.moandjiezana.toml.ValueReaders.VALUE_READERS;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
class ArrayValueReader implements ValueReader {
static final ArrayValueReader ARRAY_VALUE_READER = new ArrayValueReader();
@Override
public boolean canRead(String s) {
return s.startsWith("[");
}
@Override
public Object read(String s, AtomicInteger index, Context context) {
AtomicInteger line = context.line;
int startLine = line.get();
int startIndex = index.get();
List