Package org.gtugs.domain

Examples of org.gtugs.domain.Topic


    if (events == null || events.size() == 0) {
      List<Topic> topics = new ArrayList<Topic>(eventsGrouped.size());

      for (Map.Entry topicEntry : (Set<Map.Entry>) eventsGrouped.entrySet()) {
        Topic topic = new Topic();
        topic.setName((String) topicEntry.getKey());
        topic.setNumEvents(((Long) topicEntry.getValue()).intValue());
        topics.add(topic);
      }

      // Sort the array on numEvents
      for (int i = 1; i < topics.size(); i++) {
        int numEvents = topics.get(i).getNumEvents();
        int j = i - 1;
        boolean done = false;
        do {
          if (topics.get(j).getNumEvents() < numEvents) {
            Topic swapped = topics.remove(j + 1);
            topics.add(j, swapped);
            j--;
            if (j < 0) {
              done = true;
            }
View Full Code Here

TOP

Related Classes of org.gtugs.domain.Topic

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.