scratch.danyel.simplegraph
Class SimpleGraph
java.lang.Object
scratch.danyel.simplegraph.SimpleGraph
- All Implemented Interfaces:
- Iterable, Collection
public class SimpleGraph
- extends Object
- implements Collection
- Author:
- danyelf
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleGraph
public SimpleGraph()
size
public int size()
- Returns the number of Vertices
- Specified by:
size
in interface Collection
- See Also:
Collection.size()
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interface Collection
- See Also:
Collection.isEmpty()
contains
public boolean contains(Object arg0)
- Specified by:
contains
in interface Collection
- See Also:
Collection.contains(java.lang.Object)
iterator
public Iterator iterator()
- Specified by:
iterator
in interface Iterable
- Specified by:
iterator
in interface Collection
- See Also:
Collection.iterator()
toArray
public Object[] toArray()
- Specified by:
toArray
in interface Collection
- See Also:
Collection.toArray()
toArray
public Object[] toArray(Object[] arg0)
- Specified by:
toArray
in interface Collection
- See Also:
Collection.toArray(java.lang.Object[])
add
public boolean add(Object arg0)
- Specified by:
add
in interface Collection
- See Also:
Collection.add(java.lang.Object)
addEdge
public void addEdge(Object v1,
Object v2)
- By default, adds an undirected edge
addEdge
public void addEdge(Object v1,
Object v2,
boolean isDirected)
remove
public boolean remove(Object arg0)
- Specified by:
remove
in interface Collection
- See Also:
Collection.remove(java.lang.Object)
containsAll
public boolean containsAll(Collection arg0)
- Specified by:
containsAll
in interface Collection
- See Also:
Collection.containsAll(java.util.Collection)
addAll
public boolean addAll(Collection arg0)
- Specified by:
addAll
in interface Collection
- See Also:
Collection.addAll(java.util.Collection)
removeAll
public boolean removeAll(Collection arg0)
- Specified by:
removeAll
in interface Collection
- See Also:
Collection.removeAll(java.util.Collection)
retainAll
public boolean retainAll(Collection arg0)
- Specified by:
retainAll
in interface Collection
- See Also:
Collection.retainAll(java.util.Collection)
clear
public void clear()
- Specified by:
clear
in interface Collection
- See Also:
Collection.clear()