com.github.petrovich4j.Rule Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of petrovich4j Show documentation
Show all versions of petrovich4j Show documentation
Petrovich4j is a Java library which inflects Russian names to given grammatical case. It supports first names, last names and patronymic names inflections.
package com.github.petrovich4j;
import java.util.Arrays;
public final class Rule {
/**
* пол
*/
public final Gender gender;
/**
* правила нахождения
*/
public final String[] test;
/**
* правила изменения
*/
public final String[] mods;
public Rule(Gender gender, String[] test, String[] mods) {
if (gender == null) throw new NullPointerException(); // java 1.6: no java.util.Objects
this.gender = gender;
// make a copy to have truly immutable object
this.test = Arrays.copyOf(test, test.length);
this.mods = Arrays.copyOf(mods, mods.length);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy