Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
Modeling each GIF with a POJO is an essential step toward storing all our GIF data. In this video, we'll combine all those GIF objects into a single collection and create one method for accessing those GIF objects from the collection.
Code Block for GIF Data
Copy and paste the code below into your GifRepository
class:
private static final List<Gif> ALL_GIFS = Arrays.asList(
new Gif("android-explosion", LocalDate.of(2015,2,13), "Chris Ramacciotti", false),
new Gif("ben-and-mike", LocalDate.of(2015,10,30), "Ben Jakuben", true),
new Gif("book-dominos", LocalDate.of(2015,9,15), "Craig Dennis", false),
new Gif("compiler-bot", LocalDate.of(2015,2,13), "Ada Lovelace", true),
new Gif("cowboy-coder", LocalDate.of(2015,2,13), "Grace Hopper", false),
new Gif("infinite-andrew", LocalDate.of(2015,8,23), "Marissa Mayer", true)
);
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up