1 17 18 package org.apache.lenya.ac; 19 20 import java.io.Serializable ; 21 import java.util.Collections ; 22 23 27 public final class World implements Identifiable, Serializable { 28 29 32 private World() { 33 } 34 35 private static World instance; 36 37 41 public static World getInstance() { 42 if (instance == null) { 43 instance = new World(); 44 } 45 46 return instance; 47 } 48 49 52 public Accreditable[] getAccreditables() { 53 return (Accreditable[]) Collections.singleton(this).toArray(new Accreditable[1]); 54 } 55 } 56 | Popular Tags |