|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javautils.collections.Algs | +--suvi.api.alg.attr.AbstractGraphLayoutAttrBuilder
Abstract base for GraphLayoutAttrBuilder
s.
Field Summary | |
static javautils.fun.ObjectToObjectToObject |
AS_BOOLEAN
Checks that the given value is a Boolean and then
returns it. |
static javautils.fun.ObjectToObjectToObject |
AS_DIMENSION
Checks that the given value is a pair of non-negative integers and then returns a new Dimension -object whose width is
the first element of the pair and height is the second element. |
static javautils.fun.ObjectToObjectToObject |
AS_DOUBLE
Checks that the given value is a Double and then
returns it. |
static javautils.fun.ObjectToObjectToObject |
AS_INTEGER
Checks that the given value is an Integer and
then returns it. |
static javautils.fun.ObjectToObjectToObject |
AS_NON_NEGATIVE_DOUBLE
Checks that the given value is a non-negative Double and then returns it. |
static javautils.fun.ObjectToObjectToObject |
AS_NON_NEGATIVE_INTEGER
Checks that the given value is a non-negative Integer and then returns it. |
static javautils.fun.ObjectToObjectToObject |
AS_OBJECT
Just returns the given value. |
Fields inherited from class javautils.collections.Algs |
EMPTY_ARRAY, EMPTY_LIST, EMPTY_MAP, EMPTY_SEQUENCE, EMPTY_SET |
Fields inherited from interface suvi.api.alg.attr.GraphLayoutAttrBuilder |
NULL |
Constructor Summary | |
protected |
AbstractGraphLayoutAttrBuilder(java.util.Map keyToValueMap,
java.lang.Object[] keys,
javautils.fun.ObjectToObjectToObject keyValueToValueFun)
|
protected |
AbstractGraphLayoutAttrBuilder(java.util.Map keyToValueMap,
javautils.fun.ObjectToObjectToObject keyValueToValueFun)
|
Method Summary | |
static javautils.fun.ObjectToObjectToObject |
asKeyConstant(java.util.Map keyToConstantMap)
Checks the given value is a key of the map and then returns the value corresponding to the key in the map. |
protected static java.awt.Dimension |
cloneDimension(java.lang.Object value)
A new clone of the given value assumed to be a Dimension . |
protected static java.lang.Object |
get(java.util.Map primaryMap,
java.lang.Object primaryKey,
java.util.Map secondaryMap,
java.lang.Object secondaryKey)
|
java.lang.Object[] |
globalKeys()
The global attribute keys recognized by this builder. |
protected java.lang.Object |
key(java.lang.Object key,
java.lang.Object nodeOrEdge)
Override this method to change the key. |
java.lang.Object[] |
keys()
The attribute keys recognized by this builder. |
GraphLayoutAttr |
newAttr()
Calls newAttr(Map,Map) . |
protected abstract GraphLayoutAttr |
newAttr(java.util.Map objToValueMapCopy,
java.util.Map keyToValueMapCopy)
Called by newAttr() to build attribute object. |
void |
setAttr(java.lang.Object key,
java.lang.Object nodeOrEdge,
java.lang.Object value)
A simple Template Method [Gamma1995] that checks that the key is one of the keys() , then puts the
( -pair into a map. |
void |
setGlobalAttr(java.lang.Object globalKey,
java.lang.Object value)
A simple Template Method [Gamma1995] that checks that the key is one of the globalKeys() , then
puts the (globalKey, -pair into a map. |
protected java.lang.Object |
value(java.lang.Object key,
java.lang.Object value)
Override this method to change the value. |
Methods inherited from class javautils.collections.Algs |
addAll, allSuperInterfaces, asArray, asArray, asComparator, asUnmodifiableList, collect, collectMap, collectSet, collectUnmodifiable, concat, concat, concat, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOf, copyOfArray, ensureLength, exists, exists, exists, filter, filter, filter, find, find, find, flatten, flatten, flatten, fold, fold, fold, foldRight, foldRight, foldRight, forAll, forAll, forAll, forEach, forEach, forEach, forEach, forEach, forEach, forEachInProduct, forEachInProduct, forEachInProduct, forEachInProduct, genAddAll, genConcat, genConcat, genForEach, genForEach, getOrIfNull, integersInRange, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iterator, iteratorOverArray, map, map, map, map, map, map, mapMorphism, mapMorphismTo, mapTransform, max, max, max, max, max, max, max, min, min, min, min, min, min, min, newMap, newShapedArray, newUnmodifiableList, putAll, putAll, reverseIterator, reverseIterator, select, select, select, sign, singletonIterator, sort, sort, sorted, sorted, transform, transform, transform |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final javautils.fun.ObjectToObjectToObject AS_OBJECT
Just returns the given value.
public static final javautils.fun.ObjectToObjectToObject AS_INTEGER
Checks that the given value is an Integer
and
then returns it.
public static final javautils.fun.ObjectToObjectToObject AS_NON_NEGATIVE_INTEGER
Checks that the given value is a non-negative Integer
and then returns it.
public static final javautils.fun.ObjectToObjectToObject AS_DOUBLE
Checks that the given value is a Double
and then
returns it.
public static final javautils.fun.ObjectToObjectToObject AS_NON_NEGATIVE_DOUBLE
Checks that the given value is a non-negative Double
and then returns it.
public static final javautils.fun.ObjectToObjectToObject AS_BOOLEAN
Checks that the given value is a Boolean
and then
returns it.
public static final javautils.fun.ObjectToObjectToObject AS_DIMENSION
Checks that the given value is a pair of non-negative integers and
then returns a new Dimension
-object whose width is
the first element of the pair and height is the second element.
Constructor Detail |
protected AbstractGraphLayoutAttrBuilder(java.util.Map keyToValueMap, javautils.fun.ObjectToObjectToObject keyValueToValueFun)
protected AbstractGraphLayoutAttrBuilder(java.util.Map keyToValueMap, java.lang.Object[] keys, javautils.fun.ObjectToObjectToObject keyValueToValueFun)
Method Detail |
public java.lang.Object[] globalKeys()
GraphLayoutAttrBuilder
The global attribute keys recognized by this builder.
globalKeys
in interface GraphLayoutAttrBuilder
public java.lang.Object[] keys()
GraphLayoutAttrBuilder
The attribute keys recognized by this builder.
keys
in interface GraphLayoutAttrBuilder
public final void setGlobalAttr(java.lang.Object globalKey, java.lang.Object value)
A simple Template Method [Gamma1995]
that checks that the key is one of the globalKeys()
, then
puts the (globalKey,
-pair into a map.value
(globalKey,
value))
setGlobalAttr
in interface GraphLayoutAttrBuilder
public final void setAttr(java.lang.Object key, java.lang.Object nodeOrEdge, java.lang.Object value)
A simple Template Method [Gamma1995]
that checks that the key is one of the keys()
, then puts the
(
-pair into a map.key
(key, nodeOrEdge), value
(key,
value))
setAttr
in interface GraphLayoutAttrBuilder
protected java.lang.Object key(java.lang.Object key, java.lang.Object nodeOrEdge)
Override this method to change the key. By default, the result is
nodeOrEdge
protected java.lang.Object value(java.lang.Object key, java.lang.Object value)
Override this method to change the value.
public final GraphLayoutAttr newAttr()
Calls newAttr(Map,Map)
.
newAttr
in interface GraphLayoutAttrBuilder
protected abstract GraphLayoutAttr newAttr(java.util.Map objToValueMapCopy, java.util.Map keyToValueMapCopy)
Called by newAttr()
to build attribute object. The given
maps are copies, so you can use them directly.
public static javautils.fun.ObjectToObjectToObject asKeyConstant(java.util.Map keyToConstantMap)
Checks the given value is a key of the map and then returns the value corresponding to the key in the map.
protected static java.awt.Dimension cloneDimension(java.lang.Object value)
A new clone of the given value assumed to be a Dimension
.
protected static java.lang.Object get(java.util.Map primaryMap, java.lang.Object primaryKey, java.util.Map secondaryMap, java.lang.Object secondaryKey)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |