예제 #1
0
파일: Cat.java 프로젝트: theJenix/ormada
  @Transient
  public String getFamily() {
    StringBuilder builder = new StringBuilder();
    builder.append(this.name);
    if (kittens != null) {
      for (Kitten kitten : kittens) {
        builder.append(", ").append(kitten.getName());
      }
    }
    if (otherCat != null) {
      builder.append("\n\t").append(otherCat.getFamily());
    }

    return builder.toString();
  }
예제 #2
0
 private void initAllKitten() throws InterruptedException {
   kitten1.start();
   kitten2.start();
   kitten1.join();
   kitten2.join();
 }