ruper2/src/java/core/org/krysalis/ruper/repository/select AttributeRepositorySelector.java,NONE,1.1 NetworkRepositorySelector.java,1.1,NONE

[email protected]
Newsgroups gmane.comp.krysalis.metamorphosis.cvs
Message-ID <[email protected]>
Update of /cvsroot/metamorphosis/ruper2/src/java/core/org/krysalis/ruper/repository/select
In directory sc8-pr-cvs1:/tmp/cvs-serv3845/src/java/core/org/krysalis/ruper/repository/select

Added Files:
	AttributeRepositorySelector.java 
Removed Files:
	NetworkRepositorySelector.java 
Log Message:
1) Renamed NetworkRepositorySelector to Attribute...
2) Started to add some MessageConstants.

--- NEW FILE: AttributeRepositorySelector.java ---
/*
 * Created on Sep 10, 2003
 */
package org.krysalis.ruper.repository.select;

import org.krysalis.ruper.repository.Repository;
import org.krysalis.ruper.repository.RepositoryAttribute;
import org.krysalis.ruper.util.select.Selector;

/**
 * @author anou_mana
 */
public class AttributeRepositorySelector implements Selector {

	RepositoryAttribute m_attribute;
	Object m_attributeValue;

	public AttributeRepositorySelector(
		RepositoryAttribute attribute,
		Object attributeValue) {
		m_attribute = attribute;
		m_attributeValue = attributeValue;
	}

	public boolean select(Object repository) {
		boolean selected = false;

		Object attributeValue =
			((Repository) repository).getAttributes().get(m_attribute);

		if (null != attributeValue) {
			selected = m_attributeValue.equals(attributeValue);
		}

		return selected;
	}
}

--- NetworkRepositorySelector.java DELETED ---




-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.