From 4f1e59c1edc0fc35545429d963897f6a7e717a2c Mon Sep 17 00:00:00 2001 From: Carlos Purificacao Date: Tue, 24 May 2016 10:59:20 -0300 Subject: [PATCH] Removed old shared util implementations --- src/app/shared/utils/arrays.ts | 19 ------------------- src/app/shared/utils/hashmap.ts | 36 ------------------------------------ src/app/shared/utils/index.ts | 3 --- 3 files changed, 0 insertions(+), 58 deletions(-) delete mode 100644 src/app/shared/utils/arrays.ts delete mode 100644 src/app/shared/utils/hashmap.ts delete mode 100644 src/app/shared/utils/index.ts diff --git a/src/app/shared/utils/arrays.ts b/src/app/shared/utils/arrays.ts deleted file mode 100644 index f23ef94..0000000 --- a/src/app/shared/utils/arrays.ts +++ /dev/null @@ -1,19 +0,0 @@ -export class ArrayUtils { - - /** - * Returns if two arrays are equal - */ - static arraysEqual(a: any, b: any): boolean { - if (a === b) return true; - if (a == null || b == null) return false; - if (a.length !== b.length) return false; - - // If you don't care about the order of the elements inside - // the array, you should sort both arrays here. - for (let i = 0; i < a.length; ++i) { - if (a[i] !== b[i]) return false; - } - return true; - } - -} \ No newline at end of file diff --git a/src/app/shared/utils/hashmap.ts b/src/app/shared/utils/hashmap.ts deleted file mode 100644 index 862fb8f..0000000 --- a/src/app/shared/utils/hashmap.ts +++ /dev/null @@ -1,36 +0,0 @@ -export class HashMap { - private values: Array> = new Array(); - - get(key: K): V { - let found = this.values.find( function(value: HashItem) { - return value.key.equals(key); - }); - if (found) { - return found.value; - } - return null; - } - - put(key: K, value: V): void { - this.values.push(new HashItem(key, value)); - } - - clear() { - this.values = new Array(); - } -} - -export class HashItem { - key: K; - value: V; - constructor(key: K, value: V) { - this.key = key; - this.value = value; - } -} - -export abstract class EqualsObject { - - abstract equals(other: any): boolean; - -} \ No newline at end of file diff --git a/src/app/shared/utils/index.ts b/src/app/shared/utils/index.ts deleted file mode 100644 index 6102c1a..0000000 --- a/src/app/shared/utils/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -/* Module Index Entry - generated using the script npm run generate-index */ -export * from "./hashmap"; -export * from "./arrays"; -- libgit2 0.21.2