Ideation Project DA Ruwe
This program provides us with an agent based simulation of an ideation game.
 All Classes Functions Variables
Public Member Functions
ideation.IdeaQualityComparator Class Reference

Allows objects of the class Idea to be compared by quality. More...

Inheritance diagram for ideation.IdeaQualityComparator:
Inheritance graph
[legend]
Collaboration diagram for ideation.IdeaQualityComparator:
Collaboration graph
[legend]

List of all members.

Public Member Functions

int compare (Idea idea1, Idea idea2)
 A classic compare function according to Comparator.

Detailed Description

This class creates a comparator for ideas. It is based on the double quality attribute of ideas. Its most important use is that with Collections we can now sort a Vector<Idea> using Merge Sort (optimal) by invoking the code

Collections.sort(vec);

This saves a lot of manual iterating!

Author:
Ruediger Ruwe <ruediger.ruwe @ rwth-aachen.de>
Version:
1.0
Since:
01.06.2012

Member Function Documentation

int ideation.IdeaQualityComparator.compare ( Idea  idea1,
Idea  idea2 
)
Returns:
  • -1 First idea better
  • 0 No idea is better
  • 1 Second idea is better


The documentation for this class was generated from the following file:
 All Classes Functions Variables