android-calculatorpp/src/main/java/org/solovyev/common/NumberIntervalMapper.java

31 lines
760 B
Java
Raw Normal View History

2011-09-26 15:46:47 -04:00
/*
* Copyright (c) 2009-2011. Created by serso aka se.solovyev.
* For more information, please, contact se.solovyev@gmail.com
* or visit http://se.solovyev.org
*/
package org.solovyev.common;
import org.jetbrains.annotations.NotNull;
2011-10-23 06:11:33 -04:00
import org.jetbrains.annotations.Nullable;
import org.solovyev.common.utils.Interval;
import org.solovyev.common.utils.NumberInterval;
2011-09-26 15:46:47 -04:00
/**
* User: serso
* Date: 9/20/11
* Time: 11:56 PM
*/
public class NumberIntervalMapper<T extends Number> extends GenericIntervalMapper<T> {
public NumberIntervalMapper(@NotNull Class<T> clazz) {
super(new NumberMapper<T>(clazz));
}
2011-10-23 06:11:33 -04:00
@NotNull
@Override
protected Interval<T> newInstance(@Nullable T left, @Nullable T right) {
return new NumberInterval<T>(left, right);
}
2011-09-26 15:46:47 -04:00
}