Rabbit-R1/android (non root)/java/sources/com/airbnb/lottie/model/animatable/BaseAnimatableValue.java
2024-05-21 17:08:36 -04:00

42 lines
1.3 KiB
Java

package com.airbnb.lottie.model.animatable;
import com.airbnb.lottie.value.Keyframe;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
/* loaded from: classes2.dex */
abstract class BaseAnimatableValue<V, O> implements AnimatableValue<V, O> {
final List<Keyframe<V>> keyframes;
@Override // com.airbnb.lottie.model.animatable.AnimatableValue
public List<Keyframe<V>> getKeyframes() {
return this.keyframes;
}
/* JADX INFO: Access modifiers changed from: package-private */
public BaseAnimatableValue(V v) {
this(Collections.singletonList(new Keyframe(v)));
}
/* JADX INFO: Access modifiers changed from: package-private */
public BaseAnimatableValue(List<Keyframe<V>> list) {
this.keyframes = list;
}
@Override // com.airbnb.lottie.model.animatable.AnimatableValue
public boolean isStatic() {
if (this.keyframes.isEmpty()) {
return true;
}
return this.keyframes.size() == 1 && this.keyframes.get(0).isStatic();
}
public String toString() {
StringBuilder sb = new StringBuilder();
if (!this.keyframes.isEmpty()) {
sb.append("values=").append(Arrays.toString(this.keyframes.toArray()));
}
return sb.toString();
}
}