blob: 6f30557e4e01a5128ef777150ffc76f57e023e47 [file] [log] [blame]
package com.airbnb.lottie.parser;
import android.util.JsonReader;
import com.airbnb.lottie.utils.JsonUtils;
import java.io.IOException;
public class IntegerParser implements ValueParser<Integer> {
public static final IntegerParser INSTANCE = new IntegerParser();
private IntegerParser() {}
@Override public Integer parse(JsonReader reader, float scale) throws IOException {
return Math.round(JsonUtils.valueFromObject(reader) * scale);
}
}