pluto-http-client
Version:
HTTP client for NodeJS. Inspired in the Java JAX-RS spec so you can expect excellence, versatility and extensibility.
102 lines (101 loc) • 3.7 kB
TypeScript
import { Equals } from "../framework/equals";
import { Cloneable } from "../framework/cloneable";
import { Comparator } from "../framework/comparator";
import { Identifiable } from "../framework/identifiable";
export declare class MultiValueMap<T extends Cloneable<T> & Equals & Identifiable> {
private _items;
constructor(_items?: Map<string, List<T>>);
add(obj: T): boolean;
get(key: string): List<T> | undefined;
remove(key: string): boolean;
clone(): MultiValueMap<T>;
entries(): IterableIterator<[string, List<T>]>;
}
declare type Primitive = string | boolean | number;
export declare class WrappedPrimitive<T> implements Cloneable<WrappedPrimitive<T>>, Equals, Identifiable {
private _key;
private _value;
constructor(_key: Primitive, _value: Primitive);
get key(): Primitive;
value(): Primitive;
clone(): WrappedPrimitive<T>;
equals(other: any): boolean;
id(): string;
}
export declare class PrimitiveMultiValueMap {
private _map;
constructor();
add(key: Primitive, value: Primitive): boolean;
remove(key: Primitive): boolean;
entries(): IterableIterator<[string, Primitive[]]>;
}
declare class Entry<K, V> {
private readonly _key;
private _value;
private _left?;
private _right?;
private readonly _parent?;
constructor(key: K, value: V, parent?: Entry<K, V>);
get key(): K;
get value(): V;
set value(value: V);
get left(): Entry<K, V> | undefined;
set left(value: Entry<K, V> | undefined);
get right(): Entry<K, V> | undefined;
set right(value: Entry<K, V> | undefined);
get parent(): Entry<K, V> | undefined;
}
export declare class NumberComparator implements Comparator<number> {
compare(a: number, b: number): number;
}
export declare class SubMapKeyIterator<K, T extends Equals> implements Iterator<T> {
private fence?;
private _next?;
constructor(first?: Entry<K, T>, fence?: Entry<K, T> | undefined);
next(): IteratorResult<T>;
}
declare class EntryIterator<K, T extends Equals> implements Iterator<Entry<K, T>> {
private current?;
constructor(root?: Entry<K, T>);
next(): IteratorResult<Entry<K, T>>;
}
export declare class AscendingOrderTreeMapIterator<K, T extends Equals> implements Iterator<T> {
private last?;
private current?;
constructor(last?: Entry<K, T> | undefined);
next(): IteratorResult<T>;
}
export declare class TreeMap<K, T extends Equals> implements Iterable<T> {
protected comparator: Comparator<K>;
private _root?;
private _size;
constructor(comparator: Comparator<K>);
[Symbol.iterator](): Iterator<T>;
getCeilingEntry(key: K): Entry<K, T> | undefined;
getHigherEntry(key: K): Entry<K, T> | undefined;
tooHigh(key: K, hi: K, hiInclusive: boolean, toEnd: boolean): boolean;
private absLowest;
private absHighFence;
getFirstEntry(): Entry<K, T> | undefined;
subMap(fromKey: K, toKey: K, fromInclusive?: boolean, toInclusive?: boolean): {
[Symbol.iterator]: () => SubMapKeyIterator<K, T>;
};
entries(): {
[Symbol.iterator]: () => EntryIterator<K, T>;
};
set(k: K, value: T): T | undefined;
get size(): number;
static successor<K, T>(t: Entry<K, T>): Entry<K, T> | undefined;
}
export declare class TreeMultiValueMap<K, T extends Equals> extends TreeMap<K, List<T>> {
put(k: K, value: T): List<T> | undefined;
clone(): TreeMultiValueMap<K, T>;
}
export declare class List<T extends Equals> extends Array<T> implements Equals {
constructor(elements?: T[]);
contains(obj: T): boolean;
push(...items: T[]): number;
clone(): List<T>;
equals(other: any): boolean;
}
export {};