Nicht statische Variable, auf die beim Erstellen einer Klasseninstanz nicht aus einem statischen Kontext verwiesen werden kann

Beim Versuch, meiner Arrayliste eine neue Instanz der Edge-Klasse (Unterklasse?) Hinzuzufügen, wird der Fehler "Nicht statische Variable, auf die aus einem statischen Kontext nicht verwiesen werden kann" angezeigt. Ich kann nicht herausfinden, was ich falsch mache!

public class stuff{

    public static void main(String[] args){

        ArrayList<Edge> edges = new ArrayList<Edge>();
        edges.add(new Edge(1,2, 3, 4) );
    }

    public class Edge{

        private int x1;
        private int y1;
        private int x2;
        private int y2;
        private double distance;
        private boolean marked;

        //constructors      
        public Edge(int point1_x, int point1_y, int point2_x, int point2_y){
            x1 = point1_x;
            y1 = point1_y;
            x2 = point2_x;
            y2 = point2_y;

            int x_dist = x1 - x2;
            int y_dist = y1 - y2;
            distance = Math.hypot((double)x_dist, (double)y_dist);

            marked = false;
        }

        //methods
        public void mark(){
            marked = true;
        }
        public boolean isMarked(){
            return marked;
        }
        public double weight(){
            return distance;
        }
    }
}

Antworten auf die Frage(2)

Ihre Antwort auf die Frage