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

com.github.uscexp.blockformatpropertyfile.criteriastrategy.ComparableCriteriaStrategy Maven / Gradle / Ivy

There is a newer version: 0.2.0-Beta
Show newest version
/*
 * Copyright (C) 2014 by haui - all rights reserved
 */
package com.github.uscexp.blockformatpropertyfile.criteriastrategy;

import com.github.uscexp.blockformatpropertyfile.PropertyCondition;

/**
 * @author haui
 *
 */
public abstract class ComparableCriteriaStrategy implements CriteriaStrategy {
	
	protected PropertyCondition propertyCondition;
	
	public ComparableCriteriaStrategy(PropertyCondition propertyCondition) {
		this.propertyCondition = propertyCondition;
	}

	public void validate(Object object) {
		if (!(object instanceof Comparable)) {
			throw new RuntimeException("This class can only be tested to EQUAL or NOT_EQUAL!");
		}
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy