我找不到任何涵盖不遵循标准“s”复数形式的单词使用的 Java 命名约定。
//Given a list of biologies, what should the getter method be?
private List<Biology> biologies;
public Biology getBiology();
public List<Biology> getBiologies();
当复数形式有很大不同时,惯例是什么?
//Given a list of octopi, what should the getter method be?
private List<Octopus> octopi;
public Octopus getOctopus();
public List<Octopus> getOctopi();