xpertss.ds.concurrent.ConditionFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xdbcp Show documentation
Show all versions of xdbcp Show documentation
A modern high speed connection pool that supports multiple connection types.
package xpertss.ds.concurrent;
public class ConditionFactory {
public static Condition equal(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current == value;
}
};
}
public static Condition notEqual(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current != value;
}
};
}
public static Condition lessThan(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current < value;
}
};
}
public static Condition lessThanEqual(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current <= value;
}
};
}
public static Condition greaterThan(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current > value;
}
};
}
public static Condition greaterThanEqual(final long value)
{
return new Condition() {
public boolean evaluate(long current)
{
return current >= value;
}
};
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy