Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java')
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java76
1 files changed, 0 insertions, 76 deletions
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java
deleted file mode 100644
index d1759e4343..0000000000
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/collection/HistoryElement.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/***************************************************************************
- * Copyright (c) 2004 - 2008 Eike Stepper, Germany.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Eike Stepper - initial API and implementation
- **************************************************************************/
-package org.eclipse.net4j.internal.util.collection;
-
-import org.eclipse.net4j.util.ObjectUtil;
-import org.eclipse.net4j.util.collection.IHistory;
-import org.eclipse.net4j.util.collection.IHistoryElement;
-
-/**
- * @author Eike Stepper
- */
-public class HistoryElement<T> implements IHistoryElement<T>
-{
- private IHistory<IHistoryElement<T>> history;
-
- private T data;
-
- public HistoryElement(IHistory<IHistoryElement<T>> history, T data)
- {
- this.history = history;
- this.data = data;
- }
-
- public IHistory<IHistoryElement<T>> getHistory()
- {
- return history;
- }
-
- public T getData()
- {
- return data;
- }
-
- public String getText()
- {
- return data.toString();
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public boolean equals(Object obj)
- {
- if (obj == this)
- {
- return true;
- }
-
- if (obj instanceof IHistoryElement)
- {
- IHistoryElement<T> that = (IHistoryElement<T>)obj;
- return ObjectUtil.equals(history, that.getHistory()) && ObjectUtil.equals(data, that.getData());
- }
-
- return false;
- }
-
- @Override
- public int hashCode()
- {
- return history.hashCode() ^ data.hashCode();
- }
-
- @Override
- public String toString()
- {
- return getText();
- }
-}

Back to the top