Package | Description |
---|---|
com.yworks.yfiles.graph |
Definitions, default implementations, and support classes that represent graph structures and provide facilities for their programmatic modification.
|
Modifier and Type | Method and Description |
---|---|
<TContext,TResult> |
LookupChain.add(Class<TContext> contextType,
Class<TResult> resultType,
BiFunction<TContext,TResult,TResult> wrapperFactory)
A convenience method that adds a
IContextLookupChainLink to the given chain that is based on a
BiFunction . |
default <TContext,TResult> |
ILookupDecorator.add(Class<TContext> contextType,
Class<TResult> resultType,
BiFunction<TContext,TResult,TResult> wrapperFactory)
Adds a lookup implementation for a given type using a
BiFunction . |
<TContext,TResult> |
LookupChain.add(Class<TContext> contextType,
Class<TResult> resultType,
BiFunction<TContext,TResult,TResult> wrapperFactory,
boolean decorateNull)
A convenience method that adds a
IContextLookupChainLink to the given chain that is based on a
BiFunction . |
default <TContext,TResult> |
ILookupDecorator.add(Class<TContext> contextType,
Class<TResult> resultType,
BiFunction<TContext,TResult,TResult> wrapperFactory,
boolean decorateNull)
Adds a lookup implementation for a given type using a
BiFunction . |
<TContext,TResult> |
LookupChain.add(Class<TContext> contextType,
Class<TResult> resultType,
Function<TContext,TResult> factory)
A convenience method that adds a
IContextLookupChainLink to the given chain that is based on a
Function . |
default <TContext,TResult> |
ILookupDecorator.add(Class<TContext> contextType,
Class<TResult> resultType,
Function<TContext,TResult> factory)
Adds a lookup implementation for a given type using a
Function . |
<TContext,TResult> |
LookupChain.add(Class<TContext> contextType,
Class<TResult> resultType,
Function<TContext,TResult> factory,
boolean nullIsFallback)
A convenience method that adds a
IContextLookupChainLink to the given chain that is based on a
Function . |
default <TContext,TResult> |
ILookupDecorator.add(Class<TContext> contextType,
Class<TResult> resultType,
Function<TContext,TResult> factory,
boolean nullIsFallback)
Adds a lookup implementation for a given type using a
Function . |
IContextLookupChainLink |
LookupDecorator.addChainLink(IContextLookupChainLink lookup)
Simple helper method that tries to add the provided chain link to the
Decorator . |
default <TContext,TResult> |
ILookupDecorator.addConstant(Class<TContext> contextType,
Class<TResult> resultType,
TResult result)
Add a lookup implementation for a given type that always yields a constant result.
|
<TResult> IContextLookupChainLink |
LookupChain.addConstant(Class<TResult> resultType,
TResult result)
Convenience method that can be used instead of the
LookupChain.add(IContextLookupChainLink) method to easily add a lookup
implementation for a given type that always yields a constant result. |
static IContextLookupChainLink |
IContextLookupChainLink.createAddingLookupChainLink(Class type,
Object instance)
Factory method for a lookup chain element that simply adds an entry to a lookup chain.
|
static IContextLookupChainLink |
IContextLookupChainLink.createAddingLookupChainLink(ILookup lookup)
Factory method for a lookup chain element that adds an
ILookup layer to a lookup chain. |
static IContextLookupChainLink |
IContextLookupChainLink.createAddingLookupChainLink(Object instance)
Factory method for a lookup chain element that adds an dynamic instance to a lookup chain.
|
static IContextLookupChainLink |
IContextLookupChainLink.createContextLookupChainLink(IContextLookup callback)
Creates a lookup chain link that is backed by the given callback.
|
static <TContext,TResult> |
IContextLookupChainLink.createFactoryLookupChainLink(Class<TContext> contextType,
Class<TResult> resultType,
Function<TContext,TResult> factory)
Factory method for a lookup chain element that uses a
Function to yield a TResult for a specific
TContext . |
static IContextLookupChainLink |
IContextLookupChainLink.createHidingLookupChainLink(Class type)
Factory method for a lookup chain element that removes the entry from the lookup chain for a given type.
|
IContextLookupChainLink |
LookupDecorator.hideImplementation()
Amends the
lookup chain for all TDecoratedType items matching a predicate
to return null if TInterface is queried during the
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.hideImplementation(Predicate<TDecoratedType> predicate)
Amends the
lookup chain for all TDecoratedType items matching a predicate
to return null if TInterface is queried during the
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setFactory(Function<TDecoratedType,TInterface> factory)
Amends the
lookup chain for all TDecoratedType items, so that factory is
used to create a TInterface instance if TInterface is queried during the
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setFactory(Predicate<TDecoratedType> predicate,
Function<TDecoratedType,TInterface> factory)
Amends the
lookup chain for items matching a predicate with a factory
that creates a TInterface instance if TInterface is queried during the
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setImplementation(Predicate<TDecoratedType> predicate,
TInterface implementation)
Amends the
lookup chain for all items matching a predicate with a fixed TInterface
implementation if TInterface is queried on an item's
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setImplementation(TDecoratedType item,
TInterface implementation)
Amends the
lookup chain for a single item with a fixed TInterface implementation
if TInterface is queried on the item 's ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setImplementation(TInterface implementation)
Amends the
lookup chain , so that implementation is always returned if TInterface
is queried on an item's ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setImplementationWrapper(BiFunction<TDecoratedType,TInterface,TInterface> factory)
Amends the
lookup chain for all items with a factory callback that wraps the
underlying implementation if TInterface is queried during the
ILookup.lookup(Class) . |
IContextLookupChainLink |
LookupDecorator.setImplementationWrapper(Predicate<TDecoratedType> predicate,
BiFunction<TDecoratedType,TInterface,TInterface> factory)
Amends the
lookup chain for all items matching a predicate with a factory
callback that wraps the underlying implementation if TInterface is queried during the
ILookup.lookup(Class) . |
Modifier and Type | Method and Description |
---|---|
void |
LookupChain.add(IContextLookupChainLink lookup)
Adds the given link to the end of the chain.
|
IContextLookupChainLink |
LookupDecorator.addChainLink(IContextLookupChainLink lookup)
Simple helper method that tries to add the provided chain link to the
Decorator . |
void |
ILookupDecorator.addLookup(Class t,
IContextLookupChainLink lookup)
Adds a lookup chain element to the chain of lookups for a given type.
|
void |
DefaultGraph.addLookup(IContextLookupChainLink lookup)
Adds the chain element to the lookup for this instance.
|
void |
LookupChain.remove(IContextLookupChainLink link)
Removes the link that has previously been added to this instance from this chain.
|
void |
ILookupDecorator.removeLookup(Class t,
IContextLookupChainLink lookup)
Removes a previously registered lookup chain element from the chain of lookups for a given type.
|
void |
DefaultGraph.removeLookup(IContextLookupChainLink lookup)
Removes a previously added lookup chain element from the lookup of
this . |