updates for 0.9.3
[debian/openrocket] / src / net / sf / openrocket / rocketcomponent / ClusterConfiguration.java
index 5019fccc9e2eaeb2c676536c4c419146d2d850b9..73e8a6dee7db33dec134ba276e4b92e75dd4a9d5 100644 (file)
@@ -56,9 +56,11 @@ public class ClusterConfiguration {
        };
        
        
+       
        private final List<Double> points;
        private final String xmlName;
        
+       
        private ClusterConfiguration(String xmlName, double... points) {
                this.xmlName = xmlName;
                if (points.length == 0 || points.length%2 == 1) {
@@ -80,6 +82,13 @@ public class ClusterConfiguration {
                return points.size()/2;
        }
        
+       /**
+        * Returns the relative positions of the cluster components.  The list is of length
+        * <code>2*getClusterCount()</code> with (x,y) value pairs.  The origin is at (0,0)
+        * and the values are positioned so that the closest clusters have distance of 1.
+        * 
+        * @return      a list of (x,y) coordinate pairs.
+        */
        public List<Double> getPoints() {
                return points;  // Unmodifiable
        }
@@ -100,4 +109,10 @@ public class ClusterConfiguration {
                }
                return ret;
        }
+       
+       
+       @Override
+       public String toString() {
+               return xmlName;
+       }
 }