Created
September 10, 2017 05:11
-
-
Save shazin/9594355673f74fbc4c9e18302a7ae09c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class PersonService { | |
private final List<Person> PEOPLE = new ArrayList<>(); | |
{ | |
PEOPLE.add(new Person("Shazin")); | |
PEOPLE.add(new Person("Shahim")); | |
PEOPLE.add(new Person("Shuhail")); | |
PEOPLE.add(new Person("Shuhaib")); | |
PEOPLE.add(new Person("Athiyab")); | |
PEOPLE.add(new Person("Athif")); | |
} | |
public List<Person> getPeople() { | |
try { | |
Thread.sleep(new Random(System.currentTimeMillis()).nextInt(1000)); | |
} catch (InterruptedException e) { | |
e.printStackTrace(); | |
} | |
return Collections.unmodifiableList(PEOPLE); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment