org.robolectric.res.PluralRules Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of resources Show documentation
Show all versions of resources Show documentation
An alternative Android testing framework.
package org.robolectric.res;
import java.util.List;
public class PluralRules extends TypedResource> {
public PluralRules(List data, ResType resType, XmlContext xmlContext) {
super(data, resType, xmlContext);
}
public Plural find(int quantity) {
for (Plural p : getData()) {
if (p.num == quantity && p.usedInEnglish) return p;
}
for (Plural p : getData()) {
if (p.num == -1) return p;
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy