All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.robolectric.res.PluralRules Maven / Gradle / Ivy

There is a newer version: 4.14.1
Show newest version
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