what-the-bank/sources/com/airbnb/lottie/parser/RepeaterParser.java

43 lines
1.8 KiB
Java

package com.airbnb.lottie.parser;
import com.airbnb.lottie.LottieComposition;
import com.airbnb.lottie.model.animatable.AnimatableFloatValue;
import com.airbnb.lottie.model.animatable.AnimatableTransform;
import com.airbnb.lottie.model.content.Repeater;
import com.airbnb.lottie.parser.moshi.JsonReader;
import java.io.IOException;
/* loaded from: classes.dex */
class RepeaterParser {
private static final JsonReader.Options NAMES = JsonReader.Options.of("nm", "c", "o", "tr", "hd");
private RepeaterParser() {
}
/* JADX INFO: Access modifiers changed from: package-private */
public static Repeater parse(JsonReader jsonReader, LottieComposition lottieComposition) throws IOException {
String str = null;
AnimatableFloatValue animatableFloatValue = null;
AnimatableFloatValue animatableFloatValue2 = null;
AnimatableTransform animatableTransform = null;
boolean z = false;
while (jsonReader.hasNext()) {
int selectName = jsonReader.selectName(NAMES);
if (selectName == 0) {
str = jsonReader.nextString();
} else if (selectName == 1) {
animatableFloatValue = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
} else if (selectName == 2) {
animatableFloatValue2 = AnimatableValueParser.parseFloat(jsonReader, lottieComposition, false);
} else if (selectName == 3) {
animatableTransform = AnimatableTransformParser.parse(jsonReader, lottieComposition);
} else if (selectName == 4) {
z = jsonReader.nextBoolean();
} else {
jsonReader.skipValue();
}
}
return new Repeater(str, animatableFloatValue, animatableFloatValue2, animatableTransform, z);
}
}