com.github.uscexp.blockformatpropertyfile.criteriastrategy.StringCriteriaStrategy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of BlockFormatPropertyFile Show documentation
Show all versions of BlockFormatPropertyFile Show documentation
Property file in java style block format.
/*
* 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 StringCriteriaStrategy implements CriteriaStrategy {
protected PropertyCondition propertyCondition;
public StringCriteriaStrategy(PropertyCondition propertyCondition) {
this.propertyCondition = propertyCondition;
}
public void validate(Object object) {
if (!(object instanceof String)) {
throw new RuntimeException(String.format("Only strings can be tested to %s!", propertyCondition.name()));
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy