All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ctreber.acearth.scandot.ScanDot Maven / Gradle / Ivy

Go to download

PlantUML is a component that allows to quickly write : * sequence diagram, * use case diagram, * class diagram, * activity diagram, * component diagram, * state diagram * object diagram

The newest version!
package com.ctreber.acearth.scandot;

import com.ctreber.acearth.util.Point2D;

/**
 * 

A single scandot (opposed to a Polygon). * *

© 2002 Christian Treber, [email protected] * @author Christian Treber, [email protected] * */ public class ScanDot implements Comparable { // types of dots public static final int DotTypeStar = 0; public static final int DotTypeGrid = 1; private int fX; private int fY; private int fType; public ScanDot(int pType, int pX, int pY) { fType = pType; fX = pX; fY = pY; } public ScanDot(int pType, Point2D pPoint) { fType = pType; fX = (int)pPoint.getX(); fY = (int)pPoint.getY(); } public int compareTo(Object o) { if(o instanceof ScanDot) { ScanDot lOther = (ScanDot)o; return fY > lOther.fY ? 1 : (fY < lOther.fY ? -1 : 0); } throw new IllegalArgumentException("Can't compare to " + o.getClass()); } public int getType() { return fType; } public int getX() { return fX; } public int getY() { return fY; } public String toString() { return fX + ", " + fY + ": " + fType; } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy