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

com.bagri.server.hazelcast.predicate.PropertyPredicate Maven / Gradle / Ivy

The newest version!
package com.bagri.server.hazelcast.predicate;

import java.util.Map;
import java.util.Properties;

import com.hazelcast.query.Predicate;

public class PropertyPredicate implements Predicate {

	private String pName;
	private String pValue;
	
	public PropertyPredicate() {
		//
	}
	
	public PropertyPredicate(String pName, String pValue) {
		this.pName = pName;
		this.pValue = pValue;
	}

	@Override
	public boolean apply(Map.Entry mapEntry) {
		Properties props = mapEntry.getValue();
		String prop = props.getProperty(pName);
		return prop != null && prop.equals(pValue); 
	}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy