File tree Expand file tree Collapse file tree 1 file changed +12
-20
lines changed
Expand file tree Collapse file tree 1 file changed +12
-20
lines changed Original file line number Diff line number Diff line change @@ -164,58 +164,50 @@ public Edge<T> getIncomingEdgeOfType(Object type) {
164164 public Edge <T > getOutgoingEdgeOfType (Object type ) {
165165 return getFirstEdge (getOutgoingEdgesOfType (type ).iterator ());
166166 }
167-
168- /**
169- * Get first incoming edge of any type and assert if there is more than
170- * one.
171- */
167+
172168 public Edge <T > getIncomingEdge () {
173169 return getFirstEdge (getIncomingEdgesNotOfType (null ).iterator ());
174170 }
175-
176- /**
177- * Get first outgoing edge of any type and assert if there is more than
178- * one.
179- */
171+
180172 public Edge <T > getOutgoingEdge () {
181173 return getFirstEdge (getOutgoingEdgesNotOfType (null ).iterator ());
182174 }
183175
184176 public Set <Edge <T >> getIncomingEdges () {
185177 if (incoming == null ) incoming = new HashSet <Edge <T >>();
186-
178+
187179 return incoming ;
188180 }
189-
181+
190182 public Set <Edge <T >> getOutgoingEdges () {
191183 if (outgoing == null ) outgoing = new HashSet <Edge <T >>();
192-
184+
193185 return outgoing ;
194- }
195-
186+ }
187+
196188 public T getData () {
197189 return data ;
198190 }
199-
191+
200192 public int getID () {
201193 return data instanceof ExplicitVertexID ? ((ExplicitVertexID ) data ).getID () : id ;
202194 }
203-
195+
204196 @ Override
205197 public String toString () {
206198 boolean found = false ;
207199 StringBuilder buf = new StringBuilder (data .toString ());
208200
209201 buf .append (":" );
210-
202+
211203 Set <Edge <T >> edges = getOutgoingEdges ();
212204 int size = edges .size ();
213-
205+
214206 if (size > 0 ) {
215207 found = true ;
216208 buf .append (">[" );
217209 Iterator <Edge <T >> iterator = edges .iterator ();
218-
210+
219211 for (int i = 0 ; i < size - 1 ; i ++) {
220212 buf .append (iterator .next ().getDestination ().getID ()).append ("," );
221213 }
You can’t perform that action at this time.
0 commit comments