All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.milyn.persistence.parameter.NamedParameterIndex Maven / Gradle / Ivy

The newest version!
/*
	Milyn - Copyright (C) 2006 - 2010

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License (version 2.1) as published by the Free Software
	Foundation.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

	See the GNU Lesser General Public License for more details:
	http://www.gnu.org/licenses/lgpl.txt
*/
package org.milyn.persistence.parameter;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

import org.apache.commons.lang.builder.HashCodeBuilder;


/**
 * @author [email protected]
 *
 */
public class NamedParameterIndex extends ParameterIndex {

	private int index = 0;


	/* (non-Javadoc)
	 * @see org.milyn.scribe.parameter.Index#createParameter(int, java.lang.Object)
	 */
	@Override
	protected NamedParameter createParameter(String value) {
		return new NamedParameter(this, index++, value);
	}

	/*
	 * (non-Javadoc)
	 * @see java.lang.Object#equals(java.lang.Object)
	 */
	@Override
	public boolean equals(Object obj) {
		if(obj == this) {
			return true;
		}
		if(obj instanceof NamedParameterIndex == false) {
			return false;
		}
		return equals((ParameterIndex)obj);
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy