Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java')
-rw-r--r--plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java98
1 files changed, 0 insertions, 98 deletions
diff --git a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java b/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java
deleted file mode 100644
index d38777183..000000000
--- a/plugins/org.eclipse.wst.common.frameworks/src/org/eclipse/wst/common/frameworks/internal/enablement/FunctionGroupPatternBinding.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2003, 2005 IBM Corporation and others.
- * 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:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*
- * Created on Feb 10, 2004
- *
- * To change the template for this generated file go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-package org.eclipse.wst.common.frameworks.internal.enablement;
-
-import java.util.regex.Pattern;
-
-
-/**
- * @author schacher
- *
- * To change the template for this generated type comment go to
- * Window>Preferences>Java>Code Generation>Code and Comments
- */
-public class FunctionGroupPatternBinding {
-
- private final static int HASH_FACTOR = 89;
- private final static int HASH_INITIAL = FunctionGroupPatternBinding.class.getName().hashCode();
- private String functionGroupId;
- private transient int hashCode;
- private transient boolean hashCodeComputed;
- private Pattern pattern;
- private transient String string;
-
- /**
- *
- */
- public FunctionGroupPatternBinding(String functionGroupId, Pattern pattern) {
- if (pattern == null)
- throw new NullPointerException();
-
- this.functionGroupId = functionGroupId;
- this.pattern = pattern;
- }
-
- public int compareTo(Object object) {
- FunctionGroupPatternBinding castedObject = (FunctionGroupPatternBinding) object;
- int compareTo = Util.compare(functionGroupId, castedObject.functionGroupId);
-
- if (compareTo == 0)
- compareTo = Util.compare(pattern.pattern(), castedObject.pattern.pattern());
-
- return compareTo;
- }
-
- public boolean equals(Object object) {
- if (!(object instanceof FunctionGroupPatternBinding))
- return false;
-
- FunctionGroupPatternBinding castedObject = (FunctionGroupPatternBinding) object;
- boolean equals = true;
- equals &= Util.equals(functionGroupId, castedObject.functionGroupId);
- equals &= Util.equals(pattern, castedObject.pattern);
- return equals;
- }
-
- public String getActivityId() {
- return functionGroupId;
- }
-
- public Pattern getPattern() {
- return pattern;
- }
-
- public int hashCode() {
- if (!hashCodeComputed) {
- hashCode = HASH_INITIAL;
- hashCode = hashCode * HASH_FACTOR + Util.hashCode(functionGroupId);
- hashCode = hashCode * HASH_FACTOR + Util.hashCode(pattern);
- hashCodeComputed = true;
- }
-
- return hashCode;
- }
-
- public String toString() {
- if (string == null) {
- final StringBuffer stringBuffer = new StringBuffer();
- stringBuffer.append('[').append(functionGroupId).append(",pattern=\"").append(pattern.pattern()).append("\"]"); //$NON-NLS-1$ //$NON-NLS-2$
- string = stringBuffer.toString();
- }
-
- return string;
- }
-}

Back to the top