DirectedGraph
public
class
DirectedGraph
extends Object
java.lang.Object | |
↳ | com.android.tradefed.util.DirectedGraph<V> |
A directed unweighted graphs implementation. The vertex type can be specified.
Summary
Public constructors | |
---|---|
DirectedGraph()
|
Public methods | |
---|---|
void
|
addEdge(V from, V to)
Add an edge to the graph; if either vertex does not exist, it's added. |
void
|
addVertice(V vertex)
Add a vertex to the graph. |
boolean
|
contains(V vertex)
True if graph contains vertex. |
boolean
|
isDag()
True if graph is a dag (directed acyclic graph). |
void
|
removeEdge(V from, V to)
Remove an edge from the graph. |
String
|
toString()
String representation of graph. |
Public constructors
DirectedGraph
public DirectedGraph ()
Public methods
addEdge
public void addEdge (V from, V to)
Add an edge to the graph; if either vertex does not exist, it's added. This implementation allows the creation of multi-edges and self-loops.
Parameters | |
---|---|
from |
V |
to |
V |
addVertice
public void addVertice (V vertex)
Add a vertex to the graph. Inop if vertex is already in graph.
Parameters | |
---|---|
vertex |
V |
contains
public boolean contains (V vertex)
True if graph contains vertex. False otherwise.
Parameters | |
---|---|
vertex |
V |
Returns | |
---|---|
boolean |
isDag
public boolean isDag ()
True if graph is a dag (directed acyclic graph).
Returns | |
---|---|
boolean |
removeEdge
public void removeEdge (V from, V to)
Remove an edge from the graph.
Parameters | |
---|---|
from |
V |
to |
V |
Throws | |
---|---|
IllegalArgumentException |
if either vertex doesn't exist. |
toString
public String toString ()
String representation of graph.
Returns | |
---|---|
String |
Interfaces
Classes
- AaptParser
- AbiFormatter
- AbiUtils
- Alarm
- AppVersionFetcher
- ArrayUtil
- BluetoothUtils
- Bugreport
- BuildTestsZipUtils
- BulkEmailer
- ByteArrayList
- CircularAtraceUtil
- CircularByteArray
- ClassPathScanner
- ClassPathScanner.ClassNameFilter
- ClassPathScanner.ExternalClassNameFilter
- CommandResult
- ConditionPriorityBlockingQueue
- ConditionPriorityBlockingQueue.AlwaysMatch
- ConfigCompletor
- DeviceConcurrentUtil
- DeviceConcurrentUtil.ShellCommandCallable
- DeviceRecoveryModeUtil
- DirectedGraph
- EmmaXmlConstants
- EmmaXmlReportParser
- FakeTestsZipFolder
- FileUtil
- FixedByteArrayOutputStream
- GCSBucketUtil
- GCSFileDownloader
- HprofAllocSiteParser
- IEmail.Message
- JUnit4TestFilter
- JUnitXmlParser
- KeyguardControllerState
- ListInstrumentationParser
- ListInstrumentationParser.InstrumentationTarget
- LogcatUpdaterEventParser
- LogcatUpdaterEventParser.AsyncUpdaterEvent
- MetricsXmlParser
- MultiMap
- NullUtil
- Pair
- ProcessInfo
- PropertyChanger
- PsParser
- QuotationAwareTokenizer
- RegexTrie
- RegexTrie.CompPattern
- RunUtil
- RunUtil.RunnableResult
- SerializationUtil
- SimplePerfResult
- SimplePerfStatResultParser
- SimplePerfUtil
- SimpleStats
- SizeLimitedOutputStream
- StreamUtil
- StringEscapeUtils
- SubprocessEventHelper
- SubprocessEventHelper.BaseTestEventInfo
- SubprocessEventHelper.FailedTestEventInfo
- SubprocessEventHelper.InvocationFailedEventInfo
- SubprocessEventHelper.InvocationStartedEventInfo
- SubprocessEventHelper.LogAssociationEventInfo
- SubprocessEventHelper.TestEndedEventInfo
- SubprocessEventHelper.TestLogEventInfo
- SubprocessEventHelper.TestModuleStartedEventInfo
- SubprocessEventHelper.TestRunEndedEventInfo
- SubprocessEventHelper.TestRunFailedEventInfo
- SubprocessEventHelper.TestRunStartedEventInfo
- SubprocessEventHelper.TestStartedEventInfo
- SubprocessTestResultsParser
- SubprocessTestResultsParser.StatusKeys
- SystemUtil
- TableBuilder
- TableFormatter
- TarUtil
- TestFilterHelper
- TestLoader
- TestMapping
- TestMapping.TestInfo
- TestMapping.TestOption
- TimeUtil
- TimeVal
- UniqueMultiMap
- VersionParser
- ZipCompressionStrategy
- ZipUtil
- ZipUtil2
Enums
Exceptions