Files
upo-graphs/doc/berack96/lib/graph/Vertex.html
Giacomo Bertolazzi ddc81330ab dsadasdasd
* added a method where you can get all the marks
* implemented and tested
* moved main
* changed README
* builded JavaDoc
* builded jar
2019-06-21 23:50:34 +02:00

787 lines
34 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_144) on Fri Jun 21 23:35:55 CEST 2019 -->
<title>Vertex</title>
<meta name="date" content="2019-06-21">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Vertex";
}
}
catch(err) {
}
//-->
var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":10,"i11":10,"i12":10,"i13":10,"i14":10,"i15":10,"i16":10,"i17":10,"i18":10,"i19":10};
var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Vertex.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?berack96/lib/graph/Vertex.html" target="_top">Frames</a></li>
<li><a href="Vertex.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">berack96.lib.graph</div>
<h2 title="Class Vertex" class="title">Class Vertex&lt;V&gt;</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>berack96.lib.graph.Vertex&lt;V&gt;</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt><span class="paramLabel">Type Parameters:</span></dt>
<dd><code>V</code> - the vertex</dd>
</dl>
<hr>
<br>
<pre>public class <span class="typeNameLabel">Vertex&lt;V&gt;</span>
extends java.lang.Object</pre>
<div class="block">Class used for represent a vertex of the graph.<br>
The vertex contained is linked with the graph, so if any changes are made to
it, then they will be reflected here.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Berack96</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#REMOVED">REMOVED</a></span></code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#Vertex-berack96.lib.graph.Graph-V-">Vertex</a></span>(<a href="../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,?&gt;&nbsp;graph,
<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;vertex)</code>
<div class="block">Get a Vertex linked with the graph</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#addChild-V-java.lang.Number-">addChild</a></span>(<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;child,
java.lang.Number&nbsp;weight)</code>
<div class="block">Add a child to this vertex.<br>
The added child must be in the graph or it will return an exception.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#addIfAbsent--">addIfAbsent</a></span>()</code>
<div class="block">Add the vertex to the graph only if it's not already in the graph.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#equals-java.lang.Object-">equals</a></span>(java.lang.Object&nbsp;obj)</code>&nbsp;</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getAncestors--">getAncestors</a></span>()</code>
<div class="block">Get all the vertex ancestor of this vertex.<br>
The ancestors are all the vertices that have as destination this vertex.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getAncestorsAsVertex--">getAncestorsAsVertex</a></span>()</code>
<div class="block">Get all the ancestors of this vertex like <a href="../../../berack96/lib/graph/Vertex.html#getAncestors--"><code>getAncestors()</code></a>, but as <a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a>.<br>
In this way they are linked to the graph as this one.<br>
This method allocate a new object for each vertex, so it is more heavy.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getChildren--">getChildren</a></span>()</code>
<div class="block">Get all the vertex children of the current vertex</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getChildrenAsVertex--">getChildrenAsVertex</a></span>()</code>
<div class="block">Get all the children of this vertex like <a href="../../../berack96/lib/graph/Vertex.html#getChildren--"><code>getChildren()</code></a>, but as <a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a>.<br>
In this way they are linked to the graph as this one.<br>
* This method allocate a new object for each vertex, so it is more heavy.</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,java.lang.Number&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getEdgesIn--">getEdgesIn</a></span>()</code>
<div class="block">Get all the edge that goes INTO this vertex</div>
</td>
</tr>
<tr id="i8" class="altColor">
<td class="colFirst"><code>java.util.Collection&lt;<a href="../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,java.lang.Number&gt;&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getEdgesOut--">getEdgesOut</a></span>()</code>
<div class="block">Get all the edge that goes OUT of this vertex</div>
</td>
</tr>
<tr id="i9" class="rowColor">
<td class="colFirst"><code>java.util.Collection&lt;java.lang.Object&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getMarks--">getMarks</a></span>()</code>
<div class="block">Get all the marks that are associated with this vertex</div>
</td>
</tr>
<tr id="i10" class="altColor">
<td class="colFirst"><code><a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#getValue--">getValue</a></span>()</code>
<div class="block">Get the vertex</div>
</td>
</tr>
<tr id="i11" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#hashCode--">hashCode</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i12" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#isStillContained--">isStillContained</a></span>()</code>
<div class="block">This call tell if the current vertex is still contained in the graph linked.<br>
While this function return false all the other methods will throw an exception.</div>
</td>
</tr>
<tr id="i13" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#mark-java.lang.Object-">mark</a></span>(java.lang.Object&nbsp;mark)</code>
<div class="block">Mark the vertex with the associated string</div>
</td>
</tr>
<tr id="i14" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#remove--">remove</a></span>()</code>
<div class="block">Remove the vertex from the graph.<br>
After this call all the other methods will throw an exception</div>
</td>
</tr>
<tr id="i15" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#removeChild-V-">removeChild</a></span>(<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;child)</code>
<div class="block">Removes a child of this vertex.</div>
</td>
</tr>
<tr id="i16" class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#toString--">toString</a></span>()</code>&nbsp;</td>
</tr>
<tr id="i17" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#unMark--">unMark</a></span>()</code>
<div class="block">Remove all the marker from the vertex</div>
</td>
</tr>
<tr id="i18" class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#unMark-java.lang.Object-">unMark</a></span>(java.lang.Object&nbsp;mark)</code>
<div class="block">Remove the specified mark from this vertex</div>
</td>
</tr>
<tr id="i19" class="rowColor">
<td class="colFirst"><code><a href="../../../berack96/lib/graph/visit/impl/VisitInfo.html" title="class in berack96.lib.graph.visit.impl">VisitInfo</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../berack96/lib/graph/Vertex.html#visit-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">visit</a></span>(<a href="../../../berack96/lib/graph/visit/VisitStrategy.html" title="interface in berack96.lib.graph.visit">VisitStrategy</a>&nbsp;strategy,
java.util.function.Consumer&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&nbsp;visit)</code>
<div class="block">Visit the graph from this current vertex with the strategy assigned</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.Object</h3>
<code>clone, finalize, getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ FIELD DETAIL =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.detail">
<!-- -->
</a>
<h3>Field Detail</h3>
<a name="REMOVED">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>REMOVED</h4>
<pre>public static final&nbsp;java.lang.String REMOVED</pre>
<dl>
<dt><span class="seeLabel">See Also:</span></dt>
<dd><a href="../../../constant-values.html#berack96.lib.graph.Vertex.REMOVED">Constant Field Values</a></dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Vertex-berack96.lib.graph.Graph-java.lang.Object-">
<!-- -->
</a><a name="Vertex-berack96.lib.graph.Graph-V-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Vertex</h4>
<pre>public&nbsp;Vertex(<a href="../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph">Graph</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,?&gt;&nbsp;graph,
<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;vertex)
throws java.lang.NullPointerException</pre>
<div class="block">Get a Vertex linked with the graph</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>graph</code> - the graph of the vertex</dd>
<dd><code>vertex</code> - the vertex</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if one of the param is null</dd>
</dl>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="getValue--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getValue</h4>
<pre>public&nbsp;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;getValue()</pre>
<div class="block">Get the vertex</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>the vertex</dd>
</dl>
</li>
</ul>
<a name="mark-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>mark</h4>
<pre>public&nbsp;void&nbsp;mark(java.lang.Object&nbsp;mark)
throws java.lang.NullPointerException,
java.lang.UnsupportedOperationException</pre>
<div class="block">Mark the vertex with the associated string</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mark</code> - the marker</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the marker is null</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="unMark-java.lang.Object-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unMark</h4>
<pre>public&nbsp;void&nbsp;unMark(java.lang.Object&nbsp;mark)
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Remove the specified mark from this vertex</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>mark</code> - the marker</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the mark is null</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="unMark--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>unMark</h4>
<pre>public&nbsp;void&nbsp;unMark()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Remove all the marker from the vertex</div>
<dl>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getMarks--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getMarks</h4>
<pre>public&nbsp;java.util.Collection&lt;java.lang.Object&gt;&nbsp;getMarks()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the marks that are associated with this vertex</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a set of marks</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getChildren--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChildren</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&nbsp;getChildren()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the vertex children of the current vertex</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>all the children</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getChildrenAsVertex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getChildrenAsVertex</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&gt;&nbsp;getChildrenAsVertex()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the children of this vertex like <a href="../../../berack96/lib/graph/Vertex.html#getChildren--"><code>getChildren()</code></a>, but as <a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a>.<br>
In this way they are linked to the graph as this one.<br>
* This method allocate a new object for each vertex, so it is more heavy.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of vertices that are children of the current one</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getAncestors--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAncestors</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&nbsp;getAncestors()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the vertex ancestor of this vertex.<br>
The ancestors are all the vertices that have as destination this vertex.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of vertices</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getAncestorsAsVertex--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getAncestorsAsVertex</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph">Vertex</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&gt;&nbsp;getAncestorsAsVertex()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the ancestors of this vertex like <a href="../../../berack96/lib/graph/Vertex.html#getAncestors--"><code>getAncestors()</code></a>, but as <a href="../../../berack96/lib/graph/Vertex.html" title="class in berack96.lib.graph"><code>Vertex</code></a>.<br>
In this way they are linked to the graph as this one.<br>
This method allocate a new object for each vertex, so it is more heavy.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of vertices that are children of the current one</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getEdgesOut--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdgesOut</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,java.lang.Number&gt;&gt;&nbsp;getEdgesOut()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the edge that goes OUT of this vertex</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of edges with source this one</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="getEdgesIn--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getEdgesIn</h4>
<pre>public&nbsp;java.util.Collection&lt;<a href="../../../berack96/lib/graph/Edge.html" title="class in berack96.lib.graph">Edge</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>,java.lang.Number&gt;&gt;&nbsp;getEdgesIn()
throws java.lang.UnsupportedOperationException</pre>
<div class="block">Get all the edge that goes INTO this vertex</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>a collection of edges with destination this one</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="addChild-java.lang.Object-java.lang.Number-">
<!-- -->
</a><a name="addChild-V-java.lang.Number-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addChild</h4>
<pre>public&nbsp;void&nbsp;addChild(<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;child,
java.lang.Number&nbsp;weight)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException</pre>
<div class="block">Add a child to this vertex.<br>
The added child must be in the graph or it will return an exception.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>child</code> - the destination vertex of this edge</dd>
<dd><code>weight</code> - the weight of the edge</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the param is null</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the child vertex is not contained in the graph</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="removeChild-java.lang.Object-">
<!-- -->
</a><a name="removeChild-V-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>removeChild</h4>
<pre>public&nbsp;void&nbsp;removeChild(<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&nbsp;child)
throws java.lang.NullPointerException,
java.lang.IllegalArgumentException,
java.lang.UnsupportedOperationException</pre>
<div class="block">Removes a child of this vertex.
If the vertex passed as param is not a child, then this call does nothing.</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>child</code> - the child of the current vertex</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the param is null</dd>
<dd><code>java.lang.IllegalArgumentException</code> - if the child vertex is not contained in the graph</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="isStillContained--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isStillContained</h4>
<pre>public&nbsp;boolean&nbsp;isStillContained()</pre>
<div class="block">This call tell if the current vertex is still contained in the graph linked.<br>
While this function return false all the other methods will throw an exception.</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>true if it is, false otherwise</dd>
</dl>
</li>
</ul>
<a name="addIfAbsent--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addIfAbsent</h4>
<pre>public&nbsp;void&nbsp;addIfAbsent()</pre>
<div class="block">Add the vertex to the graph only if it's not already in the graph.</div>
</li>
</ul>
<a name="remove--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>remove</h4>
<pre>public&nbsp;void&nbsp;remove()</pre>
<div class="block">Remove the vertex from the graph.<br>
After this call all the other methods will throw an exception</div>
</li>
</ul>
<a name="visit-berack96.lib.graph.visit.VisitStrategy-java.util.function.Consumer-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>visit</h4>
<pre>public&nbsp;<a href="../../../berack96/lib/graph/visit/impl/VisitInfo.html" title="class in berack96.lib.graph.visit.impl">VisitInfo</a>&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&nbsp;visit(<a href="../../../berack96/lib/graph/visit/VisitStrategy.html" title="interface in berack96.lib.graph.visit">VisitStrategy</a>&nbsp;strategy,
java.util.function.Consumer&lt;<a href="../../../berack96/lib/graph/Vertex.html" title="type parameter in Vertex">V</a>&gt;&nbsp;visit)
throws java.lang.NullPointerException,
java.lang.UnsupportedOperationException</pre>
<div class="block">Visit the graph from this current vertex with the strategy assigned</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>strategy</code> - the strategy of the visit</dd>
<dd><code>visit</code> - the function to apply at each vertex (can be null)</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>an info of the visit if supported by the strategy</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.NullPointerException</code> - if the strategy is null</dd>
<dd><code>java.lang.UnsupportedOperationException</code> - if the vertex is not in the graph anymore</dd>
</dl>
</li>
</ul>
<a name="toString--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public&nbsp;java.lang.String&nbsp;toString()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>toString</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="hashCode--">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public&nbsp;int&nbsp;hashCode()</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>hashCode</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="equals-java.lang.Object-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>equals</h4>
<pre>public&nbsp;boolean&nbsp;equals(java.lang.Object&nbsp;obj)</pre>
<dl>
<dt><span class="overrideSpecifyLabel">Overrides:</span></dt>
<dd><code>equals</code>&nbsp;in class&nbsp;<code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Vertex.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../berack96/lib/graph/Graph.html" title="interface in berack96.lib.graph"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li>Next&nbsp;Class</li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?berack96/lib/graph/Vertex.html" target="_top">Frames</a></li>
<li><a href="Vertex.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>