@@ -0,0 +1,1501 @@
+package com.tmitim.twittercli;%0A%0Aimport java.util.List;%0A%0Aimport twitter4j.DirectMessage;%0Aimport twitter4j.Location;%0Aimport twitter4j.Status;%0A%0Apublic class SystemPrinter implements Printer%7B%0A%0A%09public void printStatuses(List%3CStatus%3E statuses) %7B%0A%09%09for (Status status : statuses) %7B%0A%09%09%09printStatus(status);%0A%09%09%7D%0A%0A%09%09if (statuses.isEmpty()) %7B%0A%09%09%09System.out.println(%22No tweets found%22);%0A%09%09%7D%0A%09%7D%0A%0A%09public void printStatus(Status status) %7B%0A%09%09System.out.println(status.getUser().getName() + %22 (@%22 + status.getUser().getScreenName() + %22): %22);%0A%09%09System.out.println(status.getText());%0A%09%09System.out.println(status.getCreatedAt());%0A%09%09System.out.println(String.format(%22ID: %25d RT: %25d %3C3: %25d%22, status.getId(), status.getRetweetCount(),%0A%09%09%09%09status.getFavoriteCount()));%0A%09%09System.out.println(%22%22);%0A%09%7D%0A%0A%09public void printAvailableLocations(List%3CLocation%3E locations) %7B%0A%09%09for (twitter4j.Location l : locations) %7B%0A%09%09%09printLocation(l);%0A%09%09%7D%0A%09%7D%0A%0A%09public void printLocation(Location location) %7B%0A%09%09System.out.println(location.getName() + %22: %22 + location.getWoeid());%0A%09%7D%0A%0A%09public void printDirectMessages(List%3CDirectMessage%3E messages, String username) %7B%0A%09%09for (DirectMessage dm : messages) %7B%0A%09%09%09printDirectMessage(dm, username);%0A%09%09%7D%0A%09%7D%0A%0A%09public void printDirectMessage(DirectMessage dm, String username) %7B%0A%09%09if (username.equals(dm.getSenderScreenName())) %7B%0A%09%09%09System.out.println(%22%3E%3E %22 + dm.getRecipientScreenName() + %22: %22 + dm.getText());%0A%09%09%7D else %7B%0A%09%09%09System.out.println(%22%3C%3C %22 + dm.getSenderScreenName() + %22: %22 + dm.getText());%0A%09%09%7D%0A%09%7D%0A%7D%0A

Add system printer