/******************************************************************************* * Copyright (c) 2015 Red Hat, Inc. Distributed under license by Red Hat, Inc. * All rights reserved. This program is 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: Red Hat, Inc. ******************************************************************************/ package org.jboss.tools.openshift.internal.ui.property; public class PrefixPropertySourceKey{ private final String key; private final String prefix; public String getKey() { return key; } public String getPrefix() { return prefix; } public PrefixPropertySourceKey(String prefix, String key){ this.key = key; this.prefix = prefix; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((key == null) ? 0 : key.hashCode()); result = prime * result + ((prefix == null) ? 0 : prefix.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PrefixPropertySourceKey other = (PrefixPropertySourceKey) obj; if (key == null) { if (other.key != null) return false; } else if (!key.equals(other.key)) return false; if (prefix == null) { if (other.prefix != null) return false; } else if (!prefix.equals(other.prefix)) return false; return true; } }