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

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

There is a newer version: 3.4-rc2
Show newest version
package org.robolectric.res;

public class Plural {
  final String quantity, string;
  final int num;

  Plural(String quantity, String string) {
    this.quantity = quantity;
    this.string = string;
    if ("zero".equals(quantity)) {
      num = 0;
    } else if ("one".equals(quantity)) {
      num = 1;
    } else if ("two".equals(quantity)) {
      num = 2;
    } else if ("other".equals(quantity)) {
      num = -1;
    } else {
      num = -1;
    }
  }

  public String getString() {
    return string;
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy