Java 类javafx.beans.binding.LongBinding 实例源码

项目:JavaFX-EX    文件:BeanConvertUtil.java   
public static LongBinding toLongBinding(ObservableValue<? extends Number> ov) {
  return new LongBinding() {
    {
      bind(ov);
    }

    @Override
    protected long computeValue() {
      return ov.getValue() == null ? 0 : ov.getValue().longValue();
    }
  };
}
项目:JavaFX-EX    文件:BeanConvertUtil.java   
public static LongBinding toLongBinding(ObservableValue<? extends Number> ov) {
  return new LongBinding() {
    {
      bind(ov);
    }

    @Override
    protected long computeValue() {
      return ov.getValue() == null ? 0 : ov.getValue().longValue();
    }
  };
}
项目:junit    文件:TestBatchModel.java   
public LongBinding durationProperty() {
    return Bindings.createLongBinding(new Callable<Long>() {
        @Override
        public Long call() throws Exception {
            return getBatch().getDuration();
        }
    }, isRunningProperty());
}
项目:fx-animation-editor    文件:ChainedBindingFunctions.java   
public LongBinding selectLong(Function<S, ? extends ObservableLongValue> childPropertyAccessor) {
    return selectLong(childPropertyAccessor, 0L);
}
项目:fx-animation-editor    文件:ChainedBindingFunctions.java   
public LongBinding selectLong(Function<S, ? extends ObservableLongValue> childPropertyAccessor, long defaultValue) {
    return new LongBindingAdapter(new ChainBinding<>(rootProperty, childPropertyAccessor), defaultValue);
}
项目:fx-animation-editor    文件:ChainedBindingFunctions.java   
public LongBinding mapToLong(Function<S, Long> childValueAccessor) {
    return mapToLong(childValueAccessor, 0L);
}
项目:fx-animation-editor    文件:ChainedBindingFunctions.java   
public LongBinding mapToLong(Function<S, Long> childValueAccessor, Long defaultValue) {
    return new LongBindingAdapter(mapToObject(childValueAccessor), defaultValue);
}
项目:myWMS    文件:LOSResultListProperty.java   
public LongBinding resultSizeProperty() {
    return resultSize;
}
项目:myWMS    文件:LOSResultListProperty.java   
public LongBinding startIndexProperty() {
    return startIndex;
}
项目:clarity-analyzer    文件:EntityIcon.java   
protected LongBinding getModelHandle() {
    return Bindings.selectLong(oe.getPropertyBinding(Long.class, "CBodyComponent.m_hModel", 0L));
}
项目:assertj-javafx    文件:LongBindingAssert.java   
protected LongBindingAssert(LongBinding actual) {
    super(actual, LongBindingAssert.class);
}
项目:assertj-javafx    文件:LongTest.java   
@Test
public void testLongBinding(){
    LongProperty value = new SimpleLongProperty(10l);

    final LongBinding actual = value.add(20l);

    assertThat(actual).hasValue(30l);

    assertThat(actual).hasSameValue(actual);
}
项目:JXTN    文件:ObservableValueExt.java   
/**
 * 建立包裝目前觀察值為長整數型態的繫節。
 *
 * @param thiz 來源觀察值
 * @param mapper 轉換目前觀察值為長整數型態的函數
 * @return 長整數型態的繫節(依賴目前的觀察物件)
 */
default LongBinding asLong(Function<? super T, ? extends Long> mapper)
{
    ObservableValue<T> thiz = (ObservableValue<T>) this;
    return Bindings.createLongBinding(() -> mapper.apply(thiz.getValue()), thiz);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#abs(long)}
 *
 *  @param   a   the argument whose absolute value is to be determined as observableValue
 * @return  the absolute value of the argument.
 */
public static LongBinding abs(final ObservableLongValue a) {
    return createLongBinding(() -> Math.abs(a.get()), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#addExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 *
 */
public static LongBinding addExact(final ObservableLongValue x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.addExact(x.get(), y.get()), x, y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#addExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding addExact(final long x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.addExact(x, y.get()), y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#addExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding addExact(final ObservableLongValue x, final long y) {
    return createLongBinding(() -> Math.addExact(x.get(), y), x);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#decrementExact(long)}
 *
 * @param a the value to decrement
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding decrementExact(final ObservableLongValue a) {
    return createLongBinding(() -> Math.decrementExact(a.get()), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorDiv(long, long)}
 *
 *  @param x the dividend
 * @param y the divisor
 * @return the largest (closest to positive infinity)
 * {@code long} value that is less than or equal to the algebraic quotient.
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorDiv(final ObservableLongValue x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.floorDiv(x.get(), y.get()), x, y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorDiv(long, long)}
 *
 *  @param x the dividend
 * @param y the divisor
 * @return the largest (closest to positive infinity)
 * {@code long} value that is less than or equal to the algebraic quotient.
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorDiv(final long x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.floorDiv(x, y.get()), y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorDiv(long, long)}
 *
 *  @param x the dividend
 * @param y the divisor
 * @return the largest (closest to positive infinity)
 * {@code long} value that is less than or equal to the algebraic quotient.
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorDiv(final ObservableLongValue x, final long y) {
    return createLongBinding(() -> Math.floorDiv(x.get(), y), x);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorMod(long, long)}
 *
 * @param x the dividend
 * @param y the divisor
 * @return the floor modulus {@code x - (floorDiv(x, y) * y)}
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorMod(final ObservableLongValue x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.floorMod(x.get(), y.get()), x, y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorMod(long, long)}
 *
 * @param x the dividend
 * @param y the divisor
 * @return the floor modulus {@code x - (floorDiv(x, y) * y)}
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorMod(final long x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.floorMod(x, y.get()), y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#floorMod(long, long)}
 *
 * @param x the dividend
 * @param y the divisor
 * @return the floor modulus {@code x - (floorDiv(x, y) * y)}
 * @throws ArithmeticException if the divisor {@code y} is zero
 */
public static LongBinding floorMod(final ObservableLongValue x, final long y) {
    return createLongBinding(() -> Math.floorMod(x.get(), y), x);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#incrementExact(long)}
 *
 *  @param a the value to increment
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding incrementExact(final ObservableLongValue a) {
    return createLongBinding(() -> Math.incrementExact(a.get()), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#max(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the larger of {@code a} and {@code b}.
 */
public static LongBinding max(final ObservableLongValue a, final ObservableLongValue b) {
    return createLongBinding(() -> Math.max(a.get(), b.get()), a, b);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#max(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the larger of {@code a} and {@code b}.
 */
public static LongBinding max(final long a, final ObservableLongValue b) {
    return createLongBinding(() -> Math.max(a, b.get()), b);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#max(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the larger of {@code a} and {@code b}.
 */
public static LongBinding max(final ObservableLongValue a, final long b) {
    return createLongBinding(() -> Math.max(a.get(), b), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#min(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the smaller of {@code a} and {@code b}.
 */
public static LongBinding min(final ObservableLongValue a, final ObservableLongValue b) {
    return createLongBinding(() -> Math.min(a.get(), b.get()), a, b);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#min(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the smaller of {@code a} and {@code b}.
 */
public static LongBinding min(final long a, final ObservableLongValue b) {
    return createLongBinding(() -> Math.min(a, b.get()), b);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#min(long, long)}
 *
 * @param   a   an argument.
 * @param   b   another argument.
 * @return  the smaller of {@code a} and {@code b}.
 */
public static LongBinding min(final ObservableLongValue a, final long b) {
    return createLongBinding(() -> Math.min(a.get(), b), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#multiplyExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding multiplyExact(final ObservableLongValue x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.multiplyExact(x.get(), y.get()), x, y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#multiplyExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding multiplyExact(final long x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.multiplyExact(x, y.get()), y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#multiplyExact(long, long)}
 *
 * @param x the first value
 * @param y the second value
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding multiplyExact(final ObservableLongValue x, final long y) {
    return createLongBinding(() -> Math.multiplyExact(x.get(), y), x);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#negateExact(long)}
 *
 * @param a the value to negate
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding negateExact(final ObservableLongValue a) {
    return createLongBinding(() -> Math.negateExact(a.get()), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#round(double)}
 *
 * @param   a   a floating-point value to be rounded to a
 *          {@code long}.
 * @return  the value of the argument rounded to the nearest
 *          {@code long} value.
 */
public static LongBinding round(final ObservableDoubleValue a) {
    return createLongBinding(() -> Math.round(a.get()), a);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#subtractExact(long, long)}
 *
 *  @param x the first value
 * @param y the second value to subtract from the first
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding subtractExact(final ObservableLongValue x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.subtractExact(x.get(), y.get()), x, y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#subtractExact(long, long)}
 *
 *  @param x the first value
 * @param y the second value to subtract from the first
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding subtractExact(final long x, final ObservableLongValue y) {
    return createLongBinding(() -> Math.subtractExact(x, y.get()), y);
}
项目:advanced-bindings    文件:MathBindings.java   
/**
 * Binding for {@link java.lang.Math#subtractExact(long, long)}
 *
 *  @param x the first value
 * @param y the second value to subtract from the first
 * @return the result
 * @throws ArithmeticException if the result overflows a long
 */
public static LongBinding subtractExact(final ObservableLongValue x, final long y) {
    return createLongBinding(() -> Math.subtractExact(x.get(), y), x);
}