NamedGraphServer, FlyweightPrototype<NamedGraphServer>public class RandomNamedGraphServer extends java.lang.Object implements NamedGraphServer
NamedGraphServer exposing a random graph.
The graph is generated using the following criteria:
index.html;
null.
The name of a page is http://site/n0/n1/…/index.html,
where every component is a non-negative integer.
| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.CharSequence[] |
EMPTY_CHARSEQUENCE_ARRAY |
| Constructor | Description |
|---|---|
RandomNamedGraphServer(int sites,
int degree,
int maxDepth) |
Builds the server.
|
RandomNamedGraphServer(int sites,
int degree,
int maxDepth,
boolean padding) |
| Modifier and Type | Method | Description |
|---|---|---|
RandomNamedGraphServer |
copy() |
|
java.lang.CharSequence[] |
successors(java.lang.CharSequence name) |
If
src corresponds to the name of a node in the graph, this method returns
an array with the name of its successors (in some order); otherwise, it returns null. |
public static final java.lang.CharSequence[] EMPTY_CHARSEQUENCE_ARRAY
public RandomNamedGraphServer(int sites,
int degree,
int maxDepth)
sites - the number of sites in the graph.degree - the degree of each node.maxDepth - the maximum depth of a site.public RandomNamedGraphServer(int sites,
int degree,
int maxDepth,
boolean padding)
public java.lang.CharSequence[] successors(java.lang.CharSequence name)
NamedGraphServersrc corresponds to the name of a node in the graph, this method returns
an array with the name of its successors (in some order); otherwise, it returns null.successors in interface NamedGraphServername - the name of a node.src, or null if name
is not the name of a node.public RandomNamedGraphServer copy()
copy in interface FlyweightPrototype<NamedGraphServer>