Source Code Cross Referenced for DataPoint.java in  » UML » jrefactory » org » acm » seguin » pmd » stat » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » UML » jrefactory » org.acm.seguin.pmd.stat 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package org.acm.seguin.pmd.stat;
002:
003:        import org.acm.seguin.pmd.Rule;
004:
005:        import java.util.Random;
006:
007:        /**
008:         * @author David Dixon-Peugh
009:         * Aug 8, 2002 DataPoint.java
010:         */
011:        public class DataPoint implements  java.lang.Comparable {
012:            private int lineNumber;
013:            private int random;
014:            private double score;
015:            private String message;
016:            private Rule rule;
017:
018:            /**
019:             * Constructor for DataPoint.
020:             */
021:            public DataPoint() {
022:                super ();
023:                // Random number is so that the TreeSet doesn't
024:                // whack things with the same score.
025:                Random rand = new Random();
026:                random = rand.nextInt(11061973);
027:            }
028:
029:            public int compareTo(Object object) {
030:
031:                DataPoint rhs = (DataPoint) object;
032:
033:                Double lhsScore = new Double(score);
034:                Double rhsScore = new Double(rhs.getScore());
035:
036:                if (lhsScore.doubleValue() != rhsScore.doubleValue()) {
037:                    return lhsScore.compareTo(rhsScore);
038:                }
039:
040:                Integer lhsRand = new Integer(random);
041:                Integer rhsRand = new Integer(rhs.random);
042:
043:                return lhsRand.compareTo(rhsRand);
044:            }
045:
046:            /**
047:             * Returns the lineNumber.
048:             * @return int
049:             */
050:            public int getLineNumber() {
051:                return lineNumber;
052:            }
053:
054:            /**
055:             * Sets the lineNumber.
056:             * @param lineNumber The lineNumber to set
057:             */
058:            public void setLineNumber(int lineNumber) {
059:                this .lineNumber = lineNumber;
060:            }
061:
062:            /**
063:             * Returns the message.
064:             * @return String
065:             */
066:            public String getMessage() {
067:                return message;
068:            }
069:
070:            /**
071:             * Returns the rule.
072:             * @return Rule
073:             */
074:            public Rule getRule() {
075:                return rule;
076:            }
077:
078:            /**
079:             * Sets the message.
080:             * @param message The message to set
081:             */
082:            public void setMessage(String message) {
083:                this .message = message;
084:            }
085:
086:            /**
087:             * Sets the rule.
088:             * @param rule The rule to set
089:             */
090:            public void setRule(Rule rule) {
091:                this .rule = rule;
092:            }
093:
094:            /**
095:             * Returns the score.
096:             * @return double
097:             */
098:            public double getScore() {
099:                return score;
100:            }
101:
102:            /**
103:             * Sets the score.
104:             * @param score The score to set
105:             */
106:            public void setScore(double score) {
107:                this .score = score;
108:            }
109:
110:            /**
111:             * Sets the score.
112:             * @param score The score to set
113:             */
114:            public void setScore(int score) {
115:                this .score = (double) score;
116:            }
117:
118:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.