mirror of
https://github.com/plexusorg/toml4j.git
synced 2024-06-01 01:11:36 +00:00
22 lines
593 B
Java
22 lines
593 B
Java
package com.moandjiezana.toml;
|
|
|
|
import java.util.concurrent.atomic.AtomicInteger;
|
|
|
|
interface ValueConverter {
|
|
|
|
/**
|
|
* @param s must already have been trimmed
|
|
*/
|
|
boolean canConvert(String s);
|
|
|
|
/**
|
|
* Partial validation. Stops after type terminator, rather than at EOI.
|
|
*
|
|
* @param s must already have been validated by {@link #canConvert(String)}
|
|
* @param index where to start in s
|
|
* @param line current line number, used for error reporting
|
|
* @return a value or a {@link Results.Errors}
|
|
*/
|
|
Object convert(String s, AtomicInteger index, Context context);
|
|
}
|