Package ca.coolman.util

Examples of ca.coolman.util.StringComparator


   */
  protected void readResponse(InputStream input) throws IOException {
    Result result = Result.fromContent(input, Result.JSON);
    Vector tweets = result.getAsArray("/root");
    if (tweets.size() > 0) {
      final Comparator cmp = new StringComparator();
      for (Enumeration e = tweets.elements(); e.hasMoreElements(); ) {
        Result tweet = Result.fromContent((Hashtable)e.nextElement());
        String id = tweet.getAsString("id_str");
        if ((since_id == null) || cmp.compare(id, since_id) > 0) {
          // this is currently causing twitter to response with no tweets.
          //setSinceId(id);
        }
        if ((max_id == null) || cmp.compare(id, max_id) < 0) {
          // first glance you'd think max_id/since_id is backwards, but
          // read the
          // twitter page noted at the top of this class.
          setMaxId(id);
        }
View Full Code Here

TOP

Related Classes of ca.coolman.util.StringComparator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.