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

com.vmlens.trace.agent.bootstrap.interleave.normalized.GraphNode Maven / Gradle / Ivy

There is a newer version: 1.1.5
Show newest version
package com.vmlens.trace.agent.bootstrap.interleave.normalized;

import java.util.Iterator;

import com.vmlens.trace.agent.bootstrap.util.TLinkableWrapper;

import gnu.trove.list.linked.TLinkedList;

public class GraphNode {
	TLinkedList> incomingNodes = new TLinkedList>();
	TLinkedList> outgoingNodes = new TLinkedList>();

	final Position position;
	boolean taken = false;

	public GraphNode(Position position) {
		super();
		this.position = position;
	}

	boolean hasIncomingNodes() {
		Iterator> it = incomingNodes.iterator();

		while (it.hasNext()) {
			TLinkableWrapper current = it.next();
			if (!current.element.deleted) {
				return true;
			}

		}

		return false;

	}

	@Override
	public String toString() {
		return "GraphNode [incomingNodes=" + incomingNodes + ", outgoingNodes=" + outgoingNodes + ", position="
				+ position + ", taken=" + taken + "]";
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy