* - -1: this is less than
obj
* - 0: this is equal to
obj
@@ -870,7 +863,7 @@ declare namespace system{
export interface ICloneable extends Object{
/**
* Create a clone of this object.
- * @returns {Object} A clone of this object.
+ * @returns A clone of this object.
* @abstract
*/
clone():Object;
@@ -881,7 +874,7 @@ declare namespace system{
};
/**
* A structure which represents a time span.
- * @class yfiles.lang.TimeSpan
+ * @class
* @implements {yfiles.lang.IComparable}
* @final
*/
@@ -889,44 +882,42 @@ declare namespace system{
export class TimeSpan {
/**
* Creates a new time span with a given length.
- * @param {number} days The days part of the time span.
- * @param {number} hours The hour part of the time span.
- * @param {number} minutes The minute part of the time span.
- * @param {number} seconds The seconds part of the time span.
- * @param {number} millis The milliseconds part of the time span.
- * @constructor
+ * @param days The days part of the time span.
+ * @param hours The hour part of the time span.
+ * @param minutes The minute part of the time span.
+ * @param seconds The seconds part of the time span.
+ * @param millis The milliseconds part of the time span.
*/
constructor(days:number,hours:number,minutes:number,seconds:number,millis:number);
/**
* Creates a new time span which is ticks milliseconds long.
- * @param {number} ticks The length of the time span in milliseconds.
- * @constructor
+ * @param ticks The length of the time span in milliseconds.
*/
constructor(ticks:number);
/**
*
- * @param {Object} obj
- * @returns {number}
+ * @param obj
+ * @returns
*/
compareTo(obj:Object):number;
/**
* Creates a new time span with the given length in milliseconds.
- * @param {number} milliseconds The length of the time span in milliseconds.
- * @returns {yfiles.lang.TimeSpan} A newly created time span.
+ * @param milliseconds The length of the time span in milliseconds.
+ * @returns A newly created time span.
* @static
*/
static fromMilliseconds(milliseconds:number):yfiles.lang.TimeSpan;
/**
* Creates a new time span with the given length in minutes.
- * @param {number} minutes The length of the time span in minutes.
- * @returns {yfiles.lang.TimeSpan} A newly created time span.
+ * @param minutes The length of the time span in minutes.
+ * @returns A newly created time span.
* @static
*/
static fromMinutes(minutes:number):yfiles.lang.TimeSpan;
/**
* Creates a new time span with the given length in seconds.
- * @param {number} seconds The length of the time span in seconds.
- * @returns {yfiles.lang.TimeSpan} A newly created time span.
+ * @param seconds The length of the time span in seconds.
+ * @returns A newly created time span.
* @static
*/
static fromSeconds(seconds:number):yfiles.lang.TimeSpan;
@@ -983,35 +974,35 @@ declare namespace system{
* function, which calls the {@link yfiles.lang.Exception#handler} function, if it has been set. Note that for some browsers/plugins, try/catch blocks prevent
* error debugging functionality. Hence, {@link yfiles.lang.Exception#catchErrors} should be turned off while debugging.
*
- * @class yfiles.lang.Exception
+ * @class
* @extends {Error}
*/
export interface Exception extends Error{}
export class Exception {
/**
* Creates a new exception with the given {@link yfiles.lang.Exception#message} and an optional error {@link yfiles.lang.Exception#name}.
- * @param {string} [message=null] The exception message.
- * @param {string} [name=null] The exception name. This name can be used in try...catch statements to distinguish between different types of errors.
+ * @param [message=null] The exception message.
+ * @param [name=null] The exception name. This name can be used in try...catch statements to distinguish between different types of errors.
+ * @param [innerException=null] The inner exception, if another exception was wrapped.
* @see yfiles.lang.Exception#message
- * @constructor
*/
- constructor(message?:string,name?:string);
+ constructor(message?:string,name?:string,innerException?:yfiles.lang.Exception);
/**
* Creates a new exception with the given {@link yfiles.lang.Exception#message} and an optional error {@link yfiles.lang.Exception#name}.
* @param {Object} options The parameters to pass.
- * @param {string} [options.message=null] The exception message.
- * @param {string} [options.name=null] The exception name. This name can be used in try...catch statements to distinguish between different types of errors.
+ * @param [options.message=null] The exception message.
+ * @param [options.name=null] The exception name. This name can be used in try...catch statements to distinguish between different types of errors.
+ * @param [options.innerException=null] The inner exception, if another exception was wrapped.
* @see yfiles.lang.Exception#message
- * @constructor
*/
- constructor(options:{message?:string,name?:string});
+ constructor(options:{message?:string,name?:string,innerException?:yfiles.lang.Exception});
/**
* This function is called in catch blocks in the library if {@link yfiles.lang.Exception#catchErrors} is enabled.
*
* If a {@link yfiles.lang.Exception#handler} is registered, the error is passed to the error handler, otherwise if {@link yfiles.lang.Exception#catchErrors} is set to true the error is logged to the
* console using console.warn if available.
*
- * @param {Object} error The error object that has been caught
+ * @param error The error object that has been caught
* @static
*/
static handleError(error:Object):void;
@@ -1025,6 +1016,11 @@ declare namespace system{
* @type {string}
*/
name:string;
+ /**
+ * The inner exception, if another exception was wrapped.
+ * @type {yfiles.lang.Exception}
+ */
+ innerException:yfiles.lang.Exception;
/**
* Whether to use try/catch blocks when invoking event handlers.
*
@@ -1047,31 +1043,1238 @@ declare namespace system{
static handler:(obj:Object)=>void;
static $class:yfiles.lang.Class;
}
- }export namespace graphml{
- export enum GraphMLMemberVisibility{
+ }export namespace collections{
+ /**
+ * The default implementation for {@link yfiles.collections.IMap.}.
+ * Type parameter TKey: The type of the key elements of this dictionary.
+ * Type parameter TValue: The type of the value elements of this dictionary.
+ * @class
+ * @implements {yfiles.collections.IMap.}
+ * @implements {yfiles.collections.ICollection.>}
+ * @implements {yfiles.collections.IEnumerable.>}
+ * @template TKey,TValue
+ */
+ export interface Map extends Object,yfiles.collections.IMap,yfiles.collections.ICollection>,yfiles.collections.IEnumerable>{}
+ export class Map {
/**
- * The member is ignored by GraphML.
+ * Creates a new instance.
+ * @param {Object} [options=null] The parameters to pass.
+ * @param options.entries An array of items which are added to this map. Each item will be added via the {@link #add} method.
*/
- HIDDEN,
+ constructor(options?:{entries?:Array});
/**
- * The member is treated according to the normal XAML serialization rules
+ *
+ * @param item
*/
- VISIBLE,
+ add(item:yfiles.collections.MapEntry):void;
/**
- * Only the content of a member value is read or written, without an enclosing excplicit container object.
+ *
+ */
+ clear():void;
+ /**
+ * Whether this dictionary contains the given value.
+ * @param value The value to search for.
+ * @returns true if this dictionary contains the given value.
+ */
+ containsValue(value:TValue):boolean;
+ /**
+ *
+ * @param array
+ * @param arrayIndex
+ */
+ copyTo(array:yfiles.collections.MapEntry[],arrayIndex:number):void;
+ /**
+ *
+ * @param key
+ * @returns
+ */
+ delete(key:TKey):boolean;
+ /**
+ *
+ * @param key
+ * @returns
+ */
+ get(key:TKey):TValue;
+ /**
+ *
+ * @returns
+ */
+ getEnumerator():yfiles.collections.IEnumerator>;
+ /**
+ *
+ * @param key
+ * @returns
+ */
+ has(key:TKey):boolean;
+ /**
+ *
+ * @param item
+ * @returns
+ */
+ includes(item:yfiles.collections.MapEntry):boolean;
+ /**
+ *
+ * @param item
+ * @returns
+ */
+ remove(item:yfiles.collections.MapEntry):boolean;
+ /**
+ *
+ * @param key
+ * @param value
+ */
+ set(key:TKey,value:TValue):void;
+ /**
+ *
+ * @type {number}
+ */
+ size:number;
+ /**
+ *
+ * @type {boolean}
+ */
+ isReadOnly:boolean;
+ /**
+ *
+ * @type {yfiles.collections.ICollection.}
+ */
+ keys:yfiles.collections.ICollection;
+ /**
+ *
+ * @type {yfiles.collections.ICollection.}
+ */
+ values:yfiles.collections.ICollection;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * Defines methods to manipulate a collection of objects with the same type.
+ * Type parameter T: The type of the elements in the collection.
+ * @interface
+ * @implements {yfiles.collections.IEnumerable.}
+ * @template T
+ */
+ export interface ICollection extends Object,yfiles.collections.IEnumerable{
+ /**
+ * Adds the given item to the collection.
+ * @param item
+ * @abstract
+ */
+ add(item:T):void;
+ /**
+ * Removes all items from this collection.
+ * @abstract
+ */
+ clear():void;
+ /**
+ * Copies all elements of this collection into the given array.
+ * @param array The array to copy the elements to.
+ * @param arrayIndex The index in the given array where the first element should be copied to.
+ * @abstract
+ */
+ copyTo(array:T[],arrayIndex:number):void;
+ /**
+ * Whether the given item is contained in this collection.
+ * @param item The item to search for.
+ * @returns true if the given item is contained in this collection.
+ * @abstract
+ */
+ includes(item:T):boolean;
+ /**
+ * Removes the given item from this collection.
+ * @param item The item to remove.
+ * @returns Whether the item was removed from the collection.
+ * @abstract
+ */
+ remove(item:T):boolean;
+ /**
+ * The number of elements in this collection.
+ * @abstract
+ * @type {number}
+ */
+ size:number;
+ /**
+ * Whether this collection is read-only.
+ * @abstract
+ * @type {boolean}
+ */
+ isReadOnly:boolean;
+ }
+ var ICollection:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * A collection of value objects which are mapped to key objects and can be queried using their keys.
+ *
+ * The keys must have a well defined hashCode method that must not change between registering a value for the key and
+ * retrieving a value using the key. Thus it is advisable to use stable, i.e. immutable, objects as the key.
+ *
+ * Type parameter TKey: The type of the keys.
+ * Type parameter TValue: The type of the values.
+ * @interface
+ * @implements {yfiles.collections.ICollection.>}
+ * @template TKey,TValue
+ */
+ export interface IMap extends Object,yfiles.collections.ICollection>{
+ /**
+ * Removes the key/value pair which is represented by the given key.
+ * @param key The key of the key/value pair to remove.
+ * @returns true if a key/value pair with the given key was removed from this collection.
+ * @abstract
+ */
+ delete(key:TKey):boolean;
+ /**
+ * Gets the value of the key/value pair with the given key.
*
- * This only makes a difference when the member value is a container object, such as a collection or map.
+ * Setter: if there is already a key/value pair with the given key in the dictionary its value will be overridden. If not a
+ * new key/value pair will be added.
+ *
+ * Getter: if there is no key/value pair with the given key in this dictionary null will be returned.
+ *
+ * @param key
+ * @returns
+ * @see yfiles.collections.IMap.#set
+ * @abstract
+ */
+ get(key:TKey):TValue;
+ /**
+ * Whether this dictionary's key collection contains the given key.
+ * @param key The key to search for.
+ * @returns true if this dictionary contains the given key.
+ * @abstract
+ */
+ has(key:TKey):boolean;
+ /**
+ * Sets the value of the key/value pair with the given key.
+ *
+ * Setter: if there is already a key/value pair with the given key in the dictionary its value will be overridden. If not a
+ * new key/value pair will be added.
+ *
+ * Getter: if there is no key/value pair with the given key in this dictionary null will be returned.
+ *
+ * @param key
+ * @param value
+ * @see yfiles.collections.IMap.#get
+ * @abstract
+ */
+ set(key:TKey,value:TValue):void;
+ /**
+ * A {@link yfiles.collections.ICollection.} of the keys of this dictionary.
+ * @abstract
+ * @type {yfiles.collections.ICollection.}
+ */
+ keys:yfiles.collections.ICollection;
+ /**
+ * A {@link yfiles.collections.ICollection.} of the values of this dictionary.
+ * @abstract
+ * @type {yfiles.collections.ICollection.}
+ */
+ values:yfiles.collections.ICollection;
+ }
+ var IMap:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * Defines ways to iterate over the items contained in this type by providing a method to get an {@link yfiles.collections.IEnumerator.}.
+ * Type parameter T: The type of the enumerable objects.
+ * @interface
+ * @template T
+ */
+ export interface IEnumerable extends Object{
+ /**
+ *
+ * @param enumerable
+ * @returns
+ */
+ concat?(enumerable:yfiles.collections.IEnumerable):yfiles.collections.IEnumerable;
+ /**
+ * Returns the element at the given index in the enumerable.
+ * @param index The index of the element to return.
+ * @returns The element at the given index.
+ * @throws {Stubs.Exceptions.ArgumentError} If the index is not within the enumerable's range.
+ */
+ elementAt?(index:number):T;
+ /**
+ * Whether all elements of the enumerable match the given predicate.
+ * @param predicate A function with the signature function(element):boolean which returns true if the element matches a condition.
+ * @param [thisArg=null]
+ * @returns Whether all elements of the enumerable match the given predicate.
+ * @throws {Stubs.Exceptions.ArgumentError} e is null.
+ * @throws {Stubs.Exceptions.ArgumentError} predicate is null.
+ */
+ every?(predicate:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):boolean;
+ /**
+ * Returns an enumerable which only contains elements of the source enumerable which match a given predicate.
+ * @param predicate A function with the signature function(element):boolean which returns true if the given element should be included in
+ * the resulting enumerable.
+ * @param [thisArg=null]
+ * @returns An enumerable which contains the elements of the source enumeration which match the given predicate.
+ */
+ filter?(predicate:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):yfiles.collections.IEnumerable;
+ /**
+ * Returns the first element of the enumerable which matches a given filter.
+ * @param [predicate=null] A function with the signature function(element):boolean which returns true if the given element should be returned
+ * @param [thisArg=null]
+ * @returns The first matching element of the enumerable.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ * @throws {Stubs.Exceptions.InvalidOperationError} If the enumerable does not contain a matching element.
+ */
+ first?(predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):T;
+ /**
+ * Returns the first element of the enumerable which matches a given filter.
+ * @param {Object} options The parameters to pass.
+ * @param [options.predicate=null] A function with the signature function(element):boolean which returns true if the given element should be returned
+ * @param [options.thisArg=null]
+ * @returns The first matching element of the enumerable.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ * @throws {Stubs.Exceptions.InvalidOperationError} If the enumerable does not contain a matching element.
+ */
+ first?(options:{predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object}):T;
+ /**
+ * Returns the first element of the enumerable, the first element of the enumerable which matches a given filter if
+ * sepcified, or null if there is no such element.
+ * @param [predicate=null] A function with the signature function(element):boolean which returns true if the given element should be returned
+ * @param [thisArg=null]
+ * @returns The first element of the enumerable or null.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ */
+ firstOrDefault?(predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):T;
+ /**
+ * Returns the first element of the enumerable, the first element of the enumerable which matches a given filter if
+ * sepcified, or null if there is no such element.
+ * @param {Object} options The parameters to pass.
+ * @param [options.predicate=null] A function with the signature function(element):boolean which returns true if the given element should be returned
+ * @param [options.thisArg=null]
+ * @returns The first element of the enumerable or null.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ */
+ firstOrDefault?(options:{predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object}):T;
+ /**
+ * Iterates over the enumerable and invokes the action for each element passing the value and index as arguments.
+ * @param action The delegate to call.
+ * @param [thisArg=null]
+ */
+ forEach?(action:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>void,thisArg?:Object):void;
+ /**
+ * Gets an {@link yfiles.collections.IEnumerator.} which can be used to iterate over the items in this instance
+ * @returns The {@link } which can be used to iterate over the items in this instance
+ * @abstract
+ */
+ getEnumerator():yfiles.collections.IEnumerator;
+ /**
+ * Whether the given value is contained in the enumerable.
+ * @param value The value to search for.
+ * @returns true if the enumerable contains the given value.
+ */
+ includes?(value:T):boolean;
+ /**
+ * Returns the last element of the enumerable.
+ * @returns The last element of the enumerable.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ * @throws {Stubs.Exceptions.InvalidOperationError} If the enumerable is empty.
+ */
+ last?():T;
+ /**
+ * Returns the last element of the enumerable or null if the enumerable is empty.
+ * @returns The last element of the enumerable or null.
+ * @throws {Stubs.Exceptions.ArgumentError} If the given enumerable is null.
+ */
+ lastOrDefault?():T;
+ /**
+ * Maps each element of the enumerable into a new element in a new enumerable.
+ * Type parameter TResult: The type of the mapped elements.
+ * @param selector A function with the signature function(element, index):TResult which converts each element into a new element of the
+ * type TResult depending on the element's index.
+ * @param [thisArg=null] The optional value to use as this when executing the selector.
+ * @returns A projection of the original enumerable.
+ * @template TResult
+ */
+ map?(selector:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>TResult,thisArg?:Object):yfiles.collections.IEnumerable;
+ /**
+ * Converts a untyped enumerable into an enumerable with the given type.
+ *
+ * The source enumerable may contain elements which are not of the given type. Those elements will not be contained in the
+ * returned enumerable.
+ *
+ * Type parameter TResult.
+ * @returns A typed enumerable.
+ * @template TResult
+ */
+ ofType?(resultType:yfiles.lang.Class):yfiles.collections.IEnumerable;
+ /**
+ * Applies an func function over the enumerable's elements.
+ * Type parameter TAccumulate: The type of the accumulated value.
+ * @param seed The start value for the accumulator.
+ * @param func A function with the signature function(seed,element):TAccumulate which "adds" (accumulates) a value depending on the
+ * element to the seed value and returns the result.
+ * @returns The final value of the accumulator.
+ * @template TAccumulate
+ */
+ reduce?(seed:TAccumulate,func:(arg1:TAccumulate,arg2:T,arg3:number,arg4:yfiles.collections.IEnumerable)=>TAccumulate):TAccumulate;
+ /**
+ * Creates a flattened view of a given enumerable using the given selector function which returns an enumerable for each
+ * element of the source enumerable.
+ * Type parameter TResult.
+ * @param selector A function with the signature function(element):IEnumerable which returns an enumerable for each element of the source
+ * enumerable.
+ * @param [thisArg=null]
+ * @returns A flattened view of the given enumerable. The enumerables which are returned by the selector method for each element are
+ * concatenated in the result.
+ * @template TResult
+ */
+ selectMany?(selector:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>yfiles.collections.IEnumerable,thisArg?:Object):yfiles.collections.IEnumerable;
+ /**
+ * Whether the enumerable contains any elements matching the given predicate.
+ * @param [predicate=null] A function with the signature function(element):boolean which returns true if the element matches a condition.
+ * @param [thisArg=null]
+ * @returns Whether the enumerable contains any elements matching the given predicate.
+ * @throws {Stubs.Exceptions.ArgumentError} e is null.
+ */
+ some?(predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):boolean;
+ /**
+ * Whether the enumerable contains any elements matching the given predicate.
+ * @param {Object} options The parameters to pass.
+ * @param [options.predicate=null] A function with the signature function(element):boolean which returns true if the element matches a condition.
+ * @param [options.thisArg=null]
+ * @returns Whether the enumerable contains any elements matching the given predicate.
+ * @throws {Stubs.Exceptions.ArgumentError} e is null.
+ */
+ some?(options:{predicate?:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object}):boolean;
+ /**
+ * Calculates the sum of the elements of the enumerable.
+ * @param selector A function with the signature function(element):Number which returns a numeric value for the given element.
+ * @param [thisArg=null]
+ * @returns The sum of the elements of the enumerable.
+ */
+ sum?(selector:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>number,thisArg?:Object):number;
+ /**
+ * Returns elements from an enumerable as long as the given predicate is true.
+ * @param predicate A function with the signature function(element):boolean which returns true as long as the elements should be added to
+ * the returned enumerable.
+ * @param [thisArg=null]
+ * @returns A subset of the original enumerable.
+ */
+ takeWhile?(predicate:(arg1:T,arg2:number,arg3:yfiles.collections.IEnumerable)=>boolean,thisArg?:Object):yfiles.collections.IEnumerable;
+ /**
+ * Creates an array with the values of the enumerable.
+ * @returns An array with the enumerable's elements.
+ */
+ toArray?():T[];
+ /**
+ * Creates a {@link yfiles.collections.List.} with the values of the enumerable.
+ * @returns An {@link } with the enumerable's elements.
+ */
+ toList?():yfiles.collections.List;
+ /**
+ * Returns an enumerable which contains the elements of the original enumerable in reverse order.
+ * @returns An enumerable which contains the elements of the original enumerable in reverse order.
+ */
+ toReversed?():yfiles.collections.IEnumerable;
+ /**
+ * Returns the number of elements contained in the enumerable.
+ * @type {number}
+ */
+ size?:number;
+ }
+ var IEnumerable:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * Provides methods to iterate over a collection or list of elements of the same type.
+ *
+ * var e = someList.getEnumerator();
+ * // always move before you access
+ * while(e.moveNext()) {
+ * // get the current element
+ * var current = e.current;
+ * }
+ *
+ *
+ * Type parameter T.
+ * @interface
+ * @template T
+ */
+ export interface IEnumerator extends Object{
+ /**
+ * Moves this enumerator to the next element.
+ *
+ * A newly created enumerator's {@link yfiles.collections.IEnumerator.#current current position} is before the first element. Thus, this method must be called before first
+ * access to the {@link yfiles.collections.IEnumerator.#current} property. The same applies to the state after calling {@link yfiles.collections.IEnumerator.#reset}.
+ *
+ * @returns true if the enumerator was moved to a valid position
+ * @abstract
+ */
+ moveNext():boolean;
+ /**
+ * Resets the enumerator to its starting state.
+ *
+ * In other words: sets the current position before the first element.
+ *
+ * @abstract
+ */
+ reset():void;
+ /**
+ * Gets the element at the enumerator's current position.
+ *
+ * This value is undefined if the enumerator is in initial state (after creation or
+ * {@link yfiles.collections.IEnumerator.#reset}) or has been moved past the end of the represented collection.
+ *
+ * @abstract
+ * @type {T}
+ */
+ current:T;
+ }
+ var IEnumerator:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * A read-write collection of objects of the same type.
+ * Type parameter T: The type of objects in the list.
+ * @interface
+ * @implements {yfiles.collections.ICollection.}
+ * @template T
+ */
+ export interface IList extends Object,yfiles.collections.ICollection{
+ /**
+ * Gets the item at the given index.
+ * @param index The index of the item to access.
+ * @returns The item at the given index.
+ * @see yfiles.collections.IList.#set
+ * @abstract
+ */
+ get(index:number):T;
+ /**
+ * The index of the given item in the list.
+ * @param item The item to search for.
+ * @returns The index of the given item in the list. -1 if the item is not in the list.
+ * @abstract
+ */
+ indexOf(item:T):number;
+ /**
+ * Inserts the given item at the given index.
+ * @param index The index to insert the item at.
+ * @param item The item to insert.
+ * @abstract
+ */
+ insert(index:number,item:T):void;
+ /**
+ * Removes the item at the given index from the list.
+ * @param index The index of the item to remove.
+ * @abstract
+ */
+ removeAt(index:number):void;
+ /**
+ * Sets the item at the given index.
+ * @param index The index of the item to access.
+ * @param value The item at the given index.
+ * @see yfiles.collections.IList.#get
+ * @abstract
+ */
+ set(index:number,value:T):void;
+ }
+ var IList:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * The key/value pair of a {@link yfiles.collections.IMap.}.
+ * Type parameter TKey: The type of the key element.
+ * Type parameter TValue: The type of the value element.
+ * @class
+ * @template TKey,TValue
+ * @final
+ */
+ export interface MapEntry extends Object{}
+ export class MapEntry {
+ /**
+ * Creates a new instance with the given key and value.
+ * @param key The key for this pair.
+ * @param value The value for this pair.
+ */
+ constructor(key:TKey,value:TValue);
+ /**
+ * The key for this key/value pair.
+ * @type {TKey}
+ */
+ key:TKey;
+ /**
+ * The value for this key/value pair.
+ * @type {TValue}
+ */
+ value:TValue;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * Default implementation of {@link yfiles.collections.IList.}.
+ *
+ * This implementation provides fast random indexed access. However, removing or adding elements from the beginning or in
+ * the middle of the list will slower.
+ *
+ * Type parameter T: The type of the list's elements.
+ * @class
+ * @implements {yfiles.collections.IList.}
+ * @template T
+ */
+ export interface List extends Object,yfiles.collections.IList{}
+ export class List {
+ /**
+ * Creates a new instance and fills it with the elements of the given enumerable.
+ * @param enumerable The enumerable to fill the list with.
+ */
+ constructor(enumerable:yfiles.collections.IEnumerable);
+ /**
+ * Creates a new instance.
+ * @param {Object} [options=null] The parameters to pass.
+ * @param options.items An array of items which are added to this list. Each item will be added via the {@link #add} method.
+ */
+ constructor(options?:{items?:Array});
+ /**
+ *
+ * @param item
+ */
+ add(item:T):void;
+ /**
+ * Adds the elements of the given collection to this list.
+ * @param enumerable The collection to add.
+ */
+ addRange(enumerable:yfiles.collections.IEnumerable):void;
+ /**
+ * Searches the (sorted) list for the given item.
+ *
+ * This search is done as a binary search, therefore the list must be sorted. The given comparer is used to compare the
+ * elements to each other.
+ *
+ * @param item The item to search for.
+ * @param comparer The comparer to use for comparing the elements.
+ * @returns The index of the item in the list. -1 if the item is not found.
+ */
+ binarySearch(item:T,comparer:yfiles.collections.IComparer):number;
+ /**
+ *
+ */
+ clear():void;
+ /**
+ *
+ * @param array
+ * @param arrayIndex
+ */
+ copyTo(array:T[],arrayIndex:number):void;
+ /**
+ * Searches the list for the first element for which match returns true.
+ * @param match A predicate function with the signature function(o:Object):boolean which returns true if o matches the conditions of the
+ * element to search for.
+ * @returns The first element for which match returns true or null is no such element in the list.
+ */
+ find(match:(obj:T)=>boolean):T;
+ /**
+ * Searches the list for the first element for which match returns true and returns its index.
+ * @param match A predicate function with the signature function(o:Object):boolean which returns true if o matches the conditions of the
+ * element to search for.
+ * @returns The index of the first element for which match returns true or -1 if there is no such element in the list.
+ */
+ findIndex(match:(obj:T)=>boolean):number;
+ /**
+ * Creates a new list with the given array used as the live backing store.
+ *
+ * Modifying the list or the array will modify both instances.
+ *
+ * @param array The array to create a list view over from.
+ * @returns A list backed by the given array.
+ * @static
+ */
+ static fromArray(array:T[]):yfiles.collections.List;
+ /**
+ *
+ * @param index
+ * @returns
+ */
+ get(index:number):T;
+ /**
+ *
+ * @returns
+ */
+ getEnumerator():yfiles.collections.IEnumerator;
+ /**
+ *
+ * @param item
+ * @returns
+ */
+ includes(item:T):boolean;
+ /**
+ *
+ * @param item
+ * @returns
+ */
+ indexOf(item:T):number;
+ /**
+ *
+ * @param index
+ * @param item
+ */
+ insert(index:number,item:T):void;
+ /**
+ *
+ * @param item
+ * @returns
+ */
+ remove(item:T):boolean;
+ /**
+ * Removes all elements for which match returns true.
+ * @param match A predicate function with the signature function(o:Object):boolean which returns true if o matches the conditions of the
+ * element to search for.
+ * @returns The number of elements which were removed.
+ */
+ removeAll(match:(obj:T)=>boolean):number;
+ /**
+ *
+ * @param index
+ */
+ removeAt(index:number):void;
+ /**
+ * Removes a given count of elements starting from the given index.
+ * @param index The index of the first element to remove.
+ * @param count The number of elements to remove.
+ */
+ removeRange(index:number,count:number):void;
+ /**
+ * Reverses the order of the elements in the list.
+ */
+ reverse():void;
+ /**
+ *
+ * @param index
+ * @param value
+ */
+ set(index:number,value:T):void;
+ /**
+ * Sorts all elements in the list using the given comparison function.
+ * @param comparison The comparison function to use.
+ */
+ sort(comparison:(arg1:Object,arg2:Object)=>number):void;
+ /**
+ * Sorts all elements in the list using the given comparer.
+ * @param comparer The comparer to use.
+ */
+ sort(comparer:yfiles.collections.IComparer):void;
+ /**
+ * Sorts all elements in list using the default comparer.
+ */
+ sort():void;
+ /**
+ * Copies the elements of this list into an array.
+ * @returns An array containing the elements of this list.
+ */
+ toArray():T[];
+ /**
+ *
+ * @type {number}
+ */
+ size:number;
+ /**
+ *
+ * @type {boolean}
+ */
+ isReadOnly:boolean;
+ capacity:number;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * Provides a method to compare two objects of the same type.
+ * Type parameter T: The type of the objects to compare.
+ * @interface
+ * @template T
+ */
+ export interface IComparer extends Object{
+ /**
+ * Compares two objects of type T.
+ * @param x The first object.
+ * @param y The second object.
+ * @returns
+ *
+ * - -1:
x is less than y
+ * - 0:
x is equal to y
+ * - 1:
x is greater than y
+ *
+ * @abstract
+ */
+ compare(x:T,y:T):number;
+ }
+ var IComparer:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * A simple default implementation of an {@link yfiles.collections.IObservableCollection.} that is backed by an ordinary {@link yfiles.collections.ICollection.}
+ * Type parameter T: The type of the elements contained in this collection.
+ * @class
+ * @implements {yfiles.collections.IObservableCollection.}
+ * @template T
+ */
+ export interface ObservableCollection extends Object,yfiles.collections.IObservableCollection{}
+ export class ObservableCollection {
+ /**
+ * Creates a new instance using a provided collection as the backing store.
+ * @param [items=null] The collection to use as the backing store. If no collection is provided a {@link } will be used.
+ */
+ constructor(items?:yfiles.collections.ICollection);
+ /**
+ * Adds the item the the collection and triggers the {@link yfiles.collections.ObservableCollection.#addItemAddedListener ItemAdded} event.
+ *
+ * This implementation calls the {@link yfiles.collections.ObservableCollection.#onItemAdded} method.
+ *
+ * @param item The item to add to the collection.
+ */
+ add(item:T):void;
+ /**
+ * Clears this collection, triggering an {@link yfiles.collections.ObservableCollection.#addItemRemovedListener ItemRemoved} event for each element removed.
+ * @see yfiles.collections.ObservableCollection.#onItemRemoved
+ */
+ clear():void;
+ /**
+ * Copies the items to the given array.
+ * @param array
+ * @param arrayIndex
+ */
+ copyTo(array:T[],arrayIndex:number):void;
+ /**
+ * Returns an enumerator over the elements in this collection.
+ * @returns
+ */
+ getEnumerator():yfiles.collections.IEnumerator;
+ /**
+ * Checks for containment of the item in this collection.
+ * @param item The item to check.
+ * @returns Whether the item is contained in this collection.
+ */
+ includes(item:T):boolean;
+ /**
+ * Callback method that will trigger the {@link yfiles.collections.ObservableCollection.#addItemAddedListener ItemAdded} event.
+ * @param item The item that has just been added to the collection.
+ * @protected
+ */
+ onItemAdded(item:T):void;
+ /**
+ * Callback method that will trigger the {@link yfiles.collections.ObservableCollection.#addItemChangedListener ItemChanged} event.
+ * @param item The item that has changed.
+ * @protected
+ */
+ onItemChanged(item:T):void;
+ /**
+ * Callback method that will trigger the {@link yfiles.collections.ObservableCollection.#addItemRemovedListener ItemRemoved} event.
+ * @param item The item that has just been removed from the collection.
+ * @protected
+ */
+ onItemRemoved(item:T):void;
+ /**
+ * Method that may be called by client code to trigger an {@link yfiles.collections.ObservableCollection.#addItemChangedListener ItemChanged} event.
+ * @param item The item to trigger the change event for.
+ * @see yfiles.collections.ObservableCollection.#onItemChanged
+ */
+ publishItemChanged(item:T):void;
+ /**
+ * Tries to remove the item from the collection and triggers the {@link yfiles.collections.ObservableCollection.#addItemRemovedListener ItemRemoved} event.
+ * @param item The item to remove.
+ * @returns Whether the item has been removed.
+ * @see yfiles.collections.ObservableCollection.#onItemRemoved
+ */
+ remove(item:T):boolean;
+ /**
+ * Returns the number of elements in this collection.
+ * @type {number}
+ */
+ size:number;
+ /**
+ * Checks whether this collection is read only.
+ * @type {boolean}
+ */
+ isReadOnly:boolean;
+ /**
+ * Gets the collection used internally as the backing store.
+ *
+ * Normally code should not use this method to gain access to the collection in order to modify it.
+ *
+ * @returns The backing store of this observable collection.
+ * @type {yfiles.collections.ICollection.}
+ */
+ items:yfiles.collections.ICollection;
+ /**
+ * Adds the given listener for the ItemAdded event that occurs when an item has been added to this collection.
+ * @param listener The listener to add.
+ * @see yfiles.collections.ObservableCollection.#removeItemAddedListener
+ */
+ addItemAddedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemAdded event that occurs when an item has been added to this collection.
+ * @param listener The listener to remove.
+ * @see yfiles.collections.ObservableCollection.#addItemAddedListener
+ */
+ removeItemAddedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Adds the given listener for the ItemRemoved event that occurs when an item has been removed from this collection.
+ * @param listener The listener to add.
+ * @see yfiles.collections.ObservableCollection.#removeItemRemovedListener
+ */
+ addItemRemovedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemRemoved event that occurs when an item has been removed from this collection.
+ * @param listener The listener to remove.
+ * @see yfiles.collections.ObservableCollection.#addItemRemovedListener
+ */
+ removeItemRemovedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Adds the given listener for the ItemChanged event that occurs when an item has been changed inside this collection.
+ * @param listener The listener to add.
+ * @see yfiles.collections.ObservableCollection.#removeItemChangedListener
+ */
+ addItemChangedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemChanged event that occurs when an item has been changed inside this collection.
+ * @param listener The listener to remove.
+ * @see yfiles.collections.ObservableCollection.#addItemChangedListener
+ */
+ removeItemChangedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * An {@link yfiles.collections.IMapper.} implementation backed by a {@link yfiles.collections.IMap.}.
+ *
+ * A {@link yfiles.collections.Mapper.#defaultValue} can be set that is returned for keys that don't have an explicit value set.
+ *
+ *
+ * It is legal to use null as key, which can be assigned a value just like other keys.
+ *
+ * Type parameter K.
+ * Type parameter V.
+ * @class
+ * @implements {yfiles.collections.IMapper.}
+ * @template K,V
+ * @final
+ */
+ export interface Mapper extends Object,yfiles.collections.IMapper{}
+ export class Mapper {
+ /**
+ * Creates an instance using the provided {@link yfiles.collections.Map.} as the backing store.
+ *
+ * The value for the null item is stored separately.
+ *
+ * @param dictionary
+ */
+ constructor(dictionary:yfiles.collections.IMap);
+ /**
+ * Creates an instance using the provided {@link yfiles.collections.Map.} as the backing store.
+ *
+ * The value for the null item is stored separately.
+ *
+ * @param {Object} options The parameters to pass.
+ * @param options.dictionary
+ * @param {V} options.defaultValue The default value to return if no specific value has been set for a given key.
+ *
+ * This option sets the {@link yfiles.collections.Mapper.#defaultValue} property on the created object.
*
*/
- CONTENT
+ constructor(options:{dictionary:yfiles.collections.IMap,defaultValue?:V});
+ /**
+ * Creates an instance using a {@link yfiles.collections.Map.} as the backing store.
+ *
+ * The value for the null item is stored separately.
+ *
+ * @param {Object} [options=null] The parameters to pass.
+ * @param {V} options.defaultValue The default value to return if no specific value has been set for a given key.
+ *
+ * This option sets the {@link yfiles.collections.Mapper.#defaultValue} property on the created object.
+ *
+ */
+ constructor(options?:{defaultValue?:V});
+ /**
+ * Calls {@link yfiles.collections.Map.#clear} on the backing implementation.
+ */
+ clear():void;
+ /**
+ *
+ * @param key
+ */
+ delete(key:K):void;
+ /**
+ *
+ * @param key
+ * @returns
+ */
+ get(key:K):V;
+ /**
+ *
+ * @param key
+ * @param value
+ */
+ set(key:K,value:V):void;
+ /**
+ * Gets an enumerable over all entries in this (dictionary based) mapper.
+ * @type {yfiles.collections.IEnumerable.>}
+ */
+ entries:yfiles.collections.IEnumerable>;
+ /**
+ * Gets or sets the default value to return if no specific value has been set for a given key.
+ * @type {V}
+ */
+ defaultValue:V;
+ static $class:yfiles.lang.Class;
}
+ /**
+ * The interface for a collection that will notify registered event handlers of changes to its contents.
+ * Type parameter T: The type of the items in the collection.
+ * @see yfiles.collections.ObservableCollection.
+ * @interface
+ * @implements {yfiles.collections.ICollection.}
+ * @template T
+ */
+ export interface IObservableCollection extends Object,yfiles.collections.ICollection{
+ /**
+ * Adds the given listener for the ItemAdded event that occurs when an item has been added to this collection.
+ * @param listener The listener to add.
+ * @see yfiles.collections.IObservableCollection.#removeItemAddedListener
+ * @abstract
+ */
+ addItemAddedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemAdded event that occurs when an item has been added to this collection.
+ * @param listener The listener to remove.
+ * @see yfiles.collections.IObservableCollection.#addItemAddedListener
+ * @abstract
+ */
+ removeItemAddedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Adds the given listener for the ItemRemoved event that occurs when an item has been removed from this collection.
+ * @param listener The listener to add.
+ * @see yfiles.collections.IObservableCollection.#removeItemRemovedListener
+ * @abstract
+ */
+ addItemRemovedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemRemoved event that occurs when an item has been removed from this collection.
+ * @param listener The listener to remove.
+ * @see yfiles.collections.IObservableCollection.#addItemRemovedListener
+ * @abstract
+ */
+ removeItemRemovedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Adds the given listener for the ItemChanged event that occurs when an item in this collection has changed
+ * significantly.
+ *
+ * It is up to the implementation whether and when to trigger this event.
+ *
+ * @param listener The listener to add.
+ * @see yfiles.collections.IObservableCollection.#removeItemChangedListener
+ * @abstract
+ */
+ addItemChangedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ /**
+ * Removes the given listener for the ItemChanged event that occurs when an item in this collection has changed
+ * significantly.
+ *
+ * It is up to the implementation whether and when to trigger this event.
+ *
+ * @param listener The listener to remove.
+ * @see yfiles.collections.IObservableCollection.#addItemChangedListener
+ * @abstract
+ */
+ removeItemChangedListener(listener:(sender:Object,evt:yfiles.collections.ItemEventArgs)=>void):void;
+ }
+ var IObservableCollection:{
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * An extension to the {@link yfiles.collections.IEnumerable.} interface that allows for indexed access and retrieval of the element count.
+ *
+ * This interface is like a rudimentary read-only {@link yfiles.collections.IList.}
+ *
+ * Type parameter T: The type of the contained elements.
+ * @interface
+ * @implements {yfiles.collections.IEnumerable.}
+ * @template T
+ */
+ export interface IListEnumerable extends Object,yfiles.collections.IEnumerable{
+ /**
+ * Gets the i-th element in the collection.
+ * @param i the zero-based index of the item in this collection
+ * @returns the item for the given index
+ * @throws {Stubs.Exceptions.ArgumentError} i is not a valid index in the {@link yfiles.collections.IListEnumerable.}.
+ * @abstract
+ */
+ get(i:number):T;
+ /**
+ * Gets the number of elements in this collection.
+ * @abstract
+ * @type {number}
+ */
+ size:number;
+ }
+ var IListEnumerable:{
+ /**
+ * An empty, immutable instance of {@link yfiles.collections.IListEnumerable.}.
+ * @const
+ * @static
+ * @type {yfiles.collections.IListEnumerable.}
+ */
+ EMPTY?:yfiles.collections.IListEnumerable;
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ /**
+ * Wraps a simple {@link yfiles.collections.IEnumerable.} into a {@link yfiles.collections.IListEnumerable.}.
+ *
+ * This implementation is optimized for {@link yfiles.collections.IList.} and {@link yfiles.collections.ICollection.}, as well as {@link Object} {@link yfiles.collections.IEnumerable.}s.
+ *
+ * Type parameter T: The type of the enumerable.
+ * @class
+ * @implements {yfiles.collections.IListEnumerable.}
+ * @template T
+ * @final
+ */
+ export interface ListEnumerable extends Object,yfiles.collections.IListEnumerable{}
+ export class ListEnumerable {
+ /**
+ * Creates a new instance using the given backing enumerable.
+ * @param backingEnumerable The enumerable to back this instance.
+ */
+ constructor(backingEnumerable:yfiles.collections.IEnumerable);
+ /**
+ * Creates a new instance with a backing {@link yfiles.collections.List.} as the backing store.
+ */
+ constructor();
+ /**
+ *
+ * @param i
+ * @returns
+ */
+ get(i:number):T;
+ /**
+ *
+ * @returns
+ */
+ getEnumerator():yfiles.collections.IEnumerator;
+ /**
+ * Gets the backing enumerable.
+ * @type {yfiles.collections.IEnumerable.}
+ */
+ backingEnumerable:yfiles.collections.IEnumerable;
+ /**
+ *
+ * @type {number}
+ */
+ size:number;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * Event argument class used by {@link yfiles.collections.IObservableCollection.} and similar that holds a specific item that is related to the event.
+ * Type parameter T: The type of the item contained in the event.
+ * @class
+ * @extends {yfiles.lang.EventArgs}
+ * @template T
+ */
+ export interface ItemEventArgs extends yfiles.lang.EventArgs{}
+ export class ItemEventArgs {
+ /**
+ * Creates a new event argument for the given item.
+ * @param item The item which is the subject of the event.
+ */
+ constructor(item:T);
+ /**
+ * Gets the item that is the subject of the event.
+ * @type {T}
+ */
+ item:T;
+ static $class:yfiles.lang.Class;
+ }
+ /**
+ * An interface for simple typed dictionary-like implementations.
+ *
+ * {@link yfiles.collections.IMapper.}s are most prominently used when interfacing with {@link yfiles.layout.ILayoutAlgorithm layout algorithms} and {@link yfiles.graphml.GraphMLIOHandler GraphML}. {@link yfiles.graph.IGraph} also provides the {@link yfiles.graph.IGraph#mapperRegistry}
+ * to add additional information to a graph.
+ *
+ * Type parameter K: The type of element this interface accepts as keys for the mapping.
+ * Type parameter V: The type of element this interface accepts as values for the mapping.
+ *
+ * Using {@link yfiles.collections.IMapper.} is described in the section {@link @DGUIDE_PREFIX@/customizing_graph-binding_data.html Associating Data with Graph Elements}.
+ *
+ * Related demos:
+ *
+ * - Demo: DragAndDropForm, demo.yfiles.input.draganddrop
+ *
+ * @see yfiles.collections.Mapper.
+ * @interface
+ * @template K,V
+ */
+ export interface IMapper extends Object{
+ /**
+ * Gets the value for a given key in the mapping.
+ *
+ * Setting a value for an already existing key overwrites the previous value.
+ *
+ *
+ * It depends on the specific implementation of the mapper whether a mapping can be removed. If an implementation provides
+ * a way to remove a mapping, that should be preferred over setting a null value. For example, {@link yfiles.collections.Mapper.} provides the {@link yfiles.collections.Mapper.#delete}
+ * method.
+ *
+ * @param key The key of the mapping.
+ * @returns The value.
+ * @see yfiles.collections.IMapper.#set
+ * @abstract
+ */
+ get(key:K):V;
+ /**
+ * Sets the value for a given key in the mapping.
+ *
+ * Setting a value for an already existing key overwrites the previous value.
+ *
+ *
+ * It depends on the specific implementation of the mapper whether a mapping can be removed. If an implementation provides
+ * a way to remove a mapping, that should be preferred over setting a null value. For example, {@link yfiles.collections.Mapper.} provides the {@link yfiles.collections.Mapper.#delete}
+ * method.
+ *
+ * @param key The key of the mapping.
+ * @param value The value.
+ * @see yfiles.collections.IMapper.#get
+ * @abstract
+ */
+ set(key:K,value:V):void;
+ }
+ var IMapper:{
+ /**
+ * Creates a constant mapper that will always return the constant.
+ * Type parameter K: The type of the key to use.
+ * Type parameter V: The type of the value to use.
+ * @param constant The constant to return in {@link #get}
+ * @returns A new instance that will always return the same constant.
+ * @template K,V
+ * @static
+ */
+ fromConstant?(constant:V):yfiles.collections.IMapper;
+ /**
+ * Create an implementation of {@link yfiles.collections.IMapper.} that delegates {@link yfiles.collections.IMapper.#get} getter calls to the provided handler.
+ *
+ * The implementation returned silently ignores calls to the {@link yfiles.collections.IMapper.#get} setter.
+ *
+ * Type parameter K: The type of the key to use.
+ * Type parameter V: The type of the value to use.
+ * @param getter The delegate to delegate {@link #get} getter calls to.
+ * @returns An implementation that delegates to getter.
+ * @template K,V
+ * @static
+ */
+ fromDelegate?(getter:(key:K)=>V):yfiles.collections.IMapper;
+ $class:yfiles.lang.Class;
+ isInstance(o:Object):boolean;
+ };
+ }export namespace graphml{
export interface XmlName extends Object{}
export class XmlName {
/**
* Initializes a new instance of the {@link yfiles.graphml.XmlName} class.
- * @param {string} localName The local name of the element.
- * @param {string} ns The namespace it belongs to.
- * @constructor
+ * @param localName The local name of the element.
+ * @param ns The namespace it belongs to.
*/
constructor(localName:string,ns:string);
/**
@@ -1081,8 +2284,8 @@ declare namespace system{
* it will be split at the "}" character and the first part will be used as the namespace URI, the second part as the local
* name. If no "}" character is used in the input then it will be assumed that the input consists of the local name only.
*
- * @param {string} expandedName Name of the expanded.
- * @returns {yfiles.graphml.XmlName} The result of the conversion.
+ * @param expandedName Name of the expanded.
+ * @returns The result of the conversion.
* @static
*/
static convertFrom(expandedName:string):yfiles.graphml.XmlName;
@@ -1101,7 +2304,7 @@ declare namespace system{
export enum XamlAttributeWritePolicy{
/**
* Specifies that the write mode of a member should be determined automatically according to the current property value and
- * the presence of {@link yfiles.support.TypeConverter}s, {@link yfiles.graphml.ValueSerializer}s and the like.
+ * the presence of {@link yfiles.graphml.ValueSerializer}s or implementations of {@link yfiles.graphml.IMarkupExtensionConverter}s.
*
* Usually, an implementation would write the member as attribute if the content can somehow be (directly or indirectly)
* converted to a valid XML attribute content (i.e. a simple string)
@@ -1138,6 +2341,20 @@ declare namespace system{
*/
ALWAYS
}
+ export enum GraphMLMemberVisibility{
+ /**
+ * The member is treated according to the normal XAML serialization rules.
+ */
+ VISIBLE,
+ /**
+ * Only the content of a member value is read or written, without an enclosing explicit container object.
+ */
+ CONTENT,
+ /**
+ * The member is ignored by GraphML.
+ */
+ HIDDEN
+ }
export enum UndefinedHandling{
/**
* Explicitly read and write undefined values.
@@ -1167,7 +2384,7 @@ declare namespace system{
* handle legacy serialization.
*
* @see yfiles.graphml.XamlSerializer
- * @class yfiles.graphml.GraphMLAttribute
+ * @class
* @extends {yfiles.lang.Attribute}
*/
export interface GraphMLAttribute extends yfiles.lang.Attribute{}
@@ -1264,14 +2481,16 @@ declare namespace system{
*/
contentProperty:string;
/**
- * Gets or sets the type of the value serializer implementation.
+ * Gets or sets the type of the {@link yfiles.graphml.GraphMLAttribute#valueSerializer} implementation.
* @type {yfiles.lang.Class}
*/
valueSerializer:yfiles.lang.Class;
/**
* Gets or sets a custom {@link yfiles.graphml.IMarkupExtensionConverter} for attribute serialization.
*
- * The specified type must implement {@link yfiles.graphml.IMarkupExtensionConverter}.
+ * The specialized {@link yfiles.graphml.XamlSerializer} will evaluate this attribute to override its built in mechanism to lookup
+ * an {@link yfiles.graphml.IMarkupExtensionConverter} for an object. The specified type must implement
+ * {@link yfiles.graphml.IMarkupExtensionConverter}.
*
* @see yfiles.graphml.XamlSerializer
* @see yfiles.graphml.IMarkupExtensionConverter
@@ -1281,8 +2500,20 @@ declare namespace system{
/**
* Types that should be searched for static field or property members of the annotated type.
*
- * This property is ignored if the attribute targets a member declaration.
+ * When a type is annotated with this attribute, all types in the {@link yfiles.graphml.GraphMLAttribute#singletonContainers} array are searched for public static fields or
+ * properties that have the annotated type. The GraphML writer will write these members as StaticExtensions instead of the
+ * usual serialization. This property is ignored if the attribute targets a member declaration.
*
+ *
+ * Using the following annotation
+ *
+ *
+ * has the effect that all references to field ContainedTypeSingleton will be written as static extensions, e.g.
+ *
+ *