- Type Parameters:
ENTITY- entity type
- All Superinterfaces:
Comparator<ENTITY>,DoubleFieldComparator<ENTITY>,com.speedment.runtime.compute.expression.Expression<ENTITY>,Field<ENTITY>,FieldComparator<ENTITY>,com.speedment.runtime.compute.trait.HasAbs<com.speedment.runtime.compute.ToDouble<ENTITY>>,com.speedment.runtime.compute.trait.HasAsDouble<ENTITY>,com.speedment.runtime.compute.trait.HasAsInt<ENTITY>,com.speedment.runtime.compute.trait.HasAsLong<ENTITY>,HasColumnName,HasComparableOperators<ENTITY,,Double> com.speedment.runtime.compute.trait.HasCompare<ENTITY>,com.speedment.runtime.compute.trait.HasCompose<ENTITY>,com.speedment.runtime.compute.trait.HasDivide<ENTITY>,HasDoubleValue<ENTITY>,HasGetter<ENTITY>,com.speedment.runtime.compute.trait.HasHash<ENTITY>,com.speedment.runtime.compute.trait.HasMap<ENTITY,,DoubleUnaryOperator, com.speedment.runtime.compute.ToDouble<ENTITY>> com.speedment.runtime.compute.trait.HasMinus<ENTITY>,com.speedment.runtime.compute.trait.HasMultiply<ENTITY>,com.speedment.runtime.compute.trait.HasNegate<com.speedment.runtime.compute.ToDouble<ENTITY>>,com.speedment.runtime.compute.trait.HasPlus<ENTITY>,com.speedment.runtime.compute.trait.HasPow<ENTITY>,com.speedment.runtime.compute.trait.HasSign<com.speedment.runtime.compute.ToByte<ENTITY>>,com.speedment.runtime.compute.trait.HasSqrt<com.speedment.runtime.compute.ToDouble<ENTITY>>,HasTable<ENTITY>,com.speedment.runtime.compute.ToDouble<ENTITY>,ToDoubleFunction<ENTITY>
public interface DoubleField<ENTITY>
extends Field<ENTITY>, HasDoubleValue<ENTITY>, HasComparableOperators<ENTITY,Double>, com.speedment.runtime.compute.ToDouble<ENTITY>, DoubleFieldComparator<ENTITY>
A field that represents a primitive
double value.
Generated by com.speedment.sources.pattern.FieldPattern.
- Since:
- 3.0.0
- Author:
- Emil Forslund
-
Method Summary
Modifier and TypeMethodDescriptiondefault doubleapplyAsDouble(ENTITY entity) Returns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.static <ENTITY> DoubleField<ENTITY>create(Class<ENTITY> table, String columnName, DoubleGetter<ENTITY> getter, boolean unique) Creates a newDoubleFieldusing the default implementation.default DoubleField<ENTITY>getField()Gets the field that is being compared.default DoubleFieldComparator<ENTITY>reversed()Returns a newFieldComparatorthat order entities in the opposite orders compared to this comparator.Methods inherited from interface java.util.Comparator
equalsMethods inherited from interface com.speedment.jpastreamer.field.comparator.FieldComparator
getNullOrder, isReversedMethods inherited from interface com.speedment.jpastreamer.field.trait.HasColumnName
columnNameMethods inherited from interface com.speedment.jpastreamer.field.trait.HasComparableOperators
between, between, comparatorNullFieldsFirst, equal, greaterOrEqual, greaterThan, in, in, lessOrEqual, lessThan, notBetween, notBetween, notEqual, notIn, notIn, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLongMethods inherited from interface com.speedment.jpastreamer.field.trait.HasDoubleValue
getAsDouble, getterMethods inherited from interface com.speedment.runtime.compute.ToDouble
abs, asDouble, asInt, asLong, compare, compose, divide, divide, divide, divide, divide, divide, expressionType, hash, map, minus, minus, minus, minus, minus, minus, minus, minus, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, negate, plus, plus, plus, plus, plus, plus, plus, plus, pow, pow, pow, pow, sign, sqrt
-
Method Details
-
create
static <ENTITY> DoubleField<ENTITY> create(Class<ENTITY> table, String columnName, DoubleGetter<ENTITY> getter, boolean unique) Creates a newDoubleFieldusing the default implementation.- Type Parameters:
ENTITY- entity type- Parameters:
table- the table that the field belongs tocolumnName- the name of the database column the field representsgetter- method reference to getter in entityunique- if column only contains unique values- Returns:
- the created field
-
applyAsDouble
- Specified by:
applyAsDoublein interfacecom.speedment.runtime.compute.ToDouble<ENTITY>- Specified by:
applyAsDoublein interfaceToDoubleFunction<ENTITY>
-
comparator
DoubleFieldComparator<ENTITY> comparator()Description copied from interface:HasComparableOperatorsReturns aComparatorthat will compare to this field using this fields natural order, null fields are sorted last.- Specified by:
comparatorin interfaceHasComparableOperators<ENTITY,Double> - Returns:
- a
Comparatorthat will compare to this field using this fields natural order, null fields are sorted last.
-
reversed
Description copied from interface:FieldComparatorReturns a newFieldComparatorthat order entities in the opposite orders compared to this comparator. For an example, if this comparator orders entities based on a column 'firstname' in descending order, then the returnedFieldComparatorwill be ordering entities based on 'firstname' in ascending order.- Specified by:
reversedin interfaceComparator<ENTITY>- Specified by:
reversedin interfaceDoubleFieldComparator<ENTITY>- Specified by:
reversedin interfaceFieldComparator<ENTITY>- Specified by:
reversedin interfaceHasComparableOperators<ENTITY,Double> - Returns:
- a new reverse comparator
-
getField
Description copied from interface:DoubleFieldComparatorGets the field that is being compared.- Specified by:
getFieldin interfaceDoubleFieldComparator<ENTITY>- Specified by:
getFieldin interfaceFieldComparator<ENTITY>- Returns:
- the compared field
-