Spec-Zone .ru
спецификации, руководства, описания, API
001/*
002 * Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
003 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
004 *
005 * This code is free software; you can redistribute it and/or modify it
006 * under the terms of the GNU General Public License version 2 only, as
007 * published by the Free Software Foundation.  Oracle designates this
008 * particular file as subject to the "Classpath" exception as provided
009 * by Oracle in the LICENSE file that accompanied this code.
010 *
011 * This code is distributed in the hope that it will be useful, but WITHOUT
012 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
013 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
014 * version 2 for more details (a copy is included in the LICENSE file that
015 * accompanied this code).
016 *
017 * You should have received a copy of the GNU General Public License version
018 * 2 along with this work; if not, write to the Free Software Foundation,
019 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
020 *
021 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
022 * or visit www.oracle.com if you need additional information or have any
023 * questions.
024 */
025
026package javafx.beans.binding;
027
028import java.util.Locale;
029
030import javafx.beans.value.ObservableNumberValue;
031
032/**
033 * A {@code NumberExpression} is a
034 * {@link javafx.beans.value.ObservableNumberValue} plus additional convenience
035 * methods to generate bindings in a fluent style.
036 * <p>
037 * This API allows to mix types when defining arithmetic operations. The type of
038 * the result is defined by the same rules as in the Java Language.
039 * <ol>
040 * <li>If one of the operands is a double, the result is a double.</li>
041 * <li>If not and one of the operands is a float, the result is a float.</li>
042 * <li>If not and one of the operands is a long, the result is a long.</li>
043 * <li>The result is an integer otherwise.</li>
044 * </ol>
045 * <p>
046 * To be able to deal with an unspecified return type, two interfaces
047 * {@code NumberExpression} and its counterpart
048 * {@link javafx.beans.binding.NumberBinding} were introduced. That means if the
049 * return type is specified as {@code NumberBinding}, the method will either
050 * return a {@link javafx.beans.binding.DoubleBinding},
051 * {@link javafx.beans.binding.FloatBinding},
052 * {@link javafx.beans.binding.LongBinding} or
053 * {@link javafx.beans.binding.IntegerBinding}, depending on the types of the
054 * operands.
055 * <p>
056 * The API tries to do its best in determining the correct return type, e.g.
057 * combining a {@link javafx.beans.value.ObservableNumberValue} with a primitive
058 * double will always result in a {@link javafx.beans.binding.DoubleBinding}. In
059 * cases where the return type is not known by the API, it is the responsibility
060 * of the developer to call the correct getter ({@link #intValue()} etc.). If
061 * the internal representation does not match the type of the getter, a standard
062 * cast is done.
063 */
064public interface NumberExpression extends ObservableNumberValue {
065
066    // ===============================================================
067    // Negation
068
069    /**
070     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
071     * the negation of {@code NumberExpression}.
072     * 
073     * @return the new {@code NumberBinding}
074     */
075    NumberBinding negate();
076
077    // ===============================================================
078    // Plus
079
080    /**
081     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
082     * the sum of this {@code NumberExpression} and another
083     * {@link javafx.beans.value.ObservableNumberValue}.
084     * 
085     * @param other
086     *            the second {@code ObservableNumberValue}
087     * @return the new {@code NumberBinding}
088     * @throws NullPointerException
089     *             if the other {@code ObservableNumberValue} is {@code null}
090     */
091    NumberBinding add(final ObservableNumberValue other);
092
093    /**
094     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
095     * the sum of this {@code NumberExpression} and a constant value.
096     * 
097     * @param other
098     *            the constant value
099     * @return the new {@code NumberBinding}
100     */
101    NumberBinding add(final double other);
102
103    /**
104     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
105     * the sum of this {@code NumberExpression} and a constant value.
106     * 
107     * @param other
108     *            the constant value
109     * @return the new {@code NumberBinding}
110     */
111    NumberBinding add(final float other);
112
113    /**
114     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
115     * the sum of this {@code NumberExpression} and a constant value.
116     * 
117     * @param other
118     *            the constant value
119     * @return the new {@code NumberBinding}
120     */
121    NumberBinding add(final long other);
122
123    /**
124     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
125     * the sum of this {@code NumberExpression} and a constant value.
126     * 
127     * @param other
128     *            the constant value
129     * @return the new {@code NumberBinding}
130     */
131    NumberBinding add(final int other);
132
133    // ===============================================================
134    // Minus
135
136    /**
137     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
138     * the difference of this {@code NumberExpression} and another
139     * {@link javafx.beans.value.ObservableNumberValue}.
140     * 
141     * @param other
142     *            the second {@code ObservableNumberValue}
143     * @return the new {@code NumberBinding}
144     * @throws NullPointerException
145     *             if the other {@code ObservableNumberValue} is {@code null}
146     */
147    NumberBinding subtract(final ObservableNumberValue other);
148
149    /**
150     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
151     * the difference of this {@code NumberExpression} and a constant value.
152     * 
153     * @param other
154     *            the constant value
155     * @return the new {@code NumberBinding}
156     */
157    NumberBinding subtract(final double other);
158
159    /**
160     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
161     * the difference of this {@code NumberExpression} and a constant value.
162     * 
163     * @param other
164     *            the constant value
165     * @return the new {@code NumberBinding}
166     */
167    NumberBinding subtract(final float other);
168
169    /**
170     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
171     * the difference of this {@code NumberExpression} and a constant value.
172     * 
173     * @param other
174     *            the constant value
175     * @return the new {@code NumberBinding}
176     */
177    NumberBinding subtract(final long other);
178
179    /**
180     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
181     * the difference of this {@code NumberExpression} and a constant value.
182     * 
183     * @param other
184     *            the constant value
185     * @return the new {@code NumberBinding}
186     */
187    NumberBinding subtract(final int other);
188
189    // ===============================================================
190    // Times
191
192    /**
193     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
194     * the product of this {@code NumberExpression} and another
195     * {@link javafx.beans.value.ObservableNumberValue}.
196     * 
197     * @param other
198     *            the second {@code ObservableNumberValue}
199     * @return the new {@code NumberBinding}
200     * @throws NullPointerException
201     *             if the other {@code ObservableNumberValue} is {@code null}
202     */
203    NumberBinding multiply(final ObservableNumberValue other);
204
205    /**
206     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
207     * the product of this {@code NumberExpression} and a constant value.
208     * 
209     * @param other
210     *            the constant value
211     * @return the new {@code NumberBinding}
212     */
213    NumberBinding multiply(final double other);
214
215    /**
216     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
217     * the product of this {@code NumberExpression} and a constant value.
218     * 
219     * @param other
220     *            the constant value
221     * @return the new {@code NumberBinding}
222     */
223    NumberBinding multiply(final float other);
224
225    /**
226     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
227     * the product of this {@code NumberExpression} and a constant value.
228     * 
229     * @param other
230     *            the constant value
231     * @return the new {@code NumberBinding}
232     */
233    NumberBinding multiply(final long other);
234
235    /**
236     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
237     * the product of this {@code NumberExpression} and a constant value.
238     * 
239     * @param other
240     *            the constant value
241     * @return the new {@code NumberBinding}
242     */
243    NumberBinding multiply(final int other);
244
245    // ===============================================================
246    // DividedBy
247
248    /**
249     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
250     * the division of this {@code NumberExpression} and another
251     * {@link javafx.beans.value.ObservableNumberValue}.
252     * 
253     * @param other
254     *            the second {@code ObservableNumberValue}
255     * @return the new {@code NumberBinding}
256     * @throws NullPointerException
257     *             if the other {@code ObservableNumberValue} is {@code null}
258     */
259    NumberBinding divide(final ObservableNumberValue other);
260
261    /**
262     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
263     * the division of this {@code NumberExpression} and a constant value.
264     * 
265     * @param other
266     *            the constant value
267     * @return the new {@code NumberBinding}
268     */
269    NumberBinding divide(final double other);
270
271    /**
272     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
273     * the division of this {@code NumberExpression} and a constant value.
274     * 
275     * @param other
276     *            the constant value
277     * @return the new {@code NumberBinding}
278     */
279    NumberBinding divide(final float other);
280
281    /**
282     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
283     * the division of this {@code NumberExpression} and a constant value.
284     * 
285     * @param other
286     *            the constant value
287     * @return the new {@code NumberBinding}
288     */
289    NumberBinding divide(final long other);
290
291    /**
292     * Creates a new {@link javafx.beans.binding.NumberBinding} that calculates
293     * the division of this {@code NumberExpression} and a constant value.
294     * 
295     * @param other
296     *            the constant value
297     * @return the new {@code NumberBinding}
298     */
299    NumberBinding divide(final int other);
300
301    // ===============================================================
302    // IsEqualTo
303
304    /**
305     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
306     * if this and another {@link javafx.beans.value.ObservableNumberValue} are
307     * equal.
308     * <p>
309     * When comparing floating-point numbers it is recommended to use the
310     * {@link #isEqualTo(ObservableNumberValue, double) isEqualTo()} method that
311     * allows a small tolerance.
312     * 
313     * @param other
314     *            the second {@code ObservableNumberValue}
315     * @return the new {@code BooleanBinding}
316     * @throws NullPointerException
317     *             if the other {@code ObservableNumberValue} is {@code null}
318     */
319    BooleanBinding isEqualTo(final ObservableNumberValue other);
320
321    /**
322     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
323     * if this and another {@link javafx.beans.value.ObservableNumberValue} are
324     * equal (with a tolerance).
325     * <p>
326     * Two operands {@code a} and {@code b} are considered equal if
327     * {@code Math.abs(a-b) <= epsilon}.
328     * <p>
329     * Allowing a small tolerance is recommended when comparing floating-point
330     * numbers because of rounding-errors.
331     * 
332     * @param other
333     *            the second {@code ObservableNumberValue}
334     * @param epsilon
335     *            the tolerance
336     * @return the new {@code BooleanBinding}
337     * @throws NullPointerException
338     *             if the other {@code ObservableNumberValue} is {@code null}
339     */
340    BooleanBinding isEqualTo(final ObservableNumberValue other, double epsilon);
341
342    /**
343     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
344     * if this {@code NumberExpression} is equal to a constant value (with a
345     * tolerance).
346     * <p>
347     * Two operands {@code a} and {@code b} are considered equal if
348     * {@code Math.abs(a-b) <= epsilon}.
349     * <p>
350     * Allowing a small tolerance is recommended when comparing floating-point
351     * numbers because of rounding-errors.
352     * 
353     * @param other
354     *            the constant value
355     * @param epsilon
356     *            the permitted tolerance
357     * @return the new {@code BooleanBinding}
358     */
359    BooleanBinding isEqualTo(final double other, double epsilon);
360
361    /**
362     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
363     * if this {@code NumberExpression} is equal to a constant value (with a
364     * tolerance).
365     * <p>
366     * Two operands {@code a} and {@code b} are considered equal if
367     * {@code Math.abs(a-b) <= epsilon}.
368     * <p>
369     * Allowing a small tolerance is recommended when comparing floating-point
370     * numbers because of rounding-errors.
371     * 
372     * @param other
373     *            the constant value
374     * @param epsilon
375     *            the permitted tolerance
376     * @return the new {@code BooleanBinding}
377     */
378    BooleanBinding isEqualTo(final float other, double epsilon);
379
380    /**
381     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
382     * if this {@code NumberExpression} is equal to a constant value.
383     * <p>
384     * When comparing floating-point numbers it is recommended to use the
385     * {@link #isEqualTo(long, double) isEqualTo()} method that allows a small
386     * tolerance.
387     * 
388     * @param other
389     *            the constant value
390     * @return the new {@code BooleanBinding}
391     */
392    BooleanBinding isEqualTo(final long other);
393
394    /**
395     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
396     * if this {@code NumberExpression} is equal to a constant value (with a
397     * tolerance).
398     * <p>
399     * Two operands {@code a} and {@code b} are considered equal if
400     * {@code Math.abs(a-b) <= epsilon}.
401     * <p>
402     * Allowing a small tolerance is recommended when comparing floating-point
403     * numbers because of rounding-errors.
404     * 
405     * @param other
406     *            the constant value
407     * @param epsilon
408     *            the permitted tolerance
409     * @return the new {@code BooleanBinding}
410     */
411    BooleanBinding isEqualTo(final long other, double epsilon);
412
413    /**
414     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
415     * if this {@code NumberExpression} is equal to a constant value.
416     * <p>
417     * When comparing floating-point numbers it is recommended to use the
418     * {@link #isEqualTo(int, double) isEqualTo()} method that allows a small
419     * tolerance.
420     * 
421     * @param other
422     *            the constant value
423     * @return the new {@code BooleanBinding}
424     */
425    BooleanBinding isEqualTo(final int other);
426
427    /**
428     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
429     * if this {@code NumberExpression} is equal to a constant value (with a
430     * tolerance).
431     * <p>
432     * Two operands {@code a} and {@code b} are considered equal if
433     * {@code Math.abs(a-b) <= epsilon}.
434     * <p>
435     * Allowing a small tolerance is recommended when comparing floating-point
436     * numbers.
437     * 
438     * @param other
439     *            the constant value
440     * @param epsilon
441     *            the permitted tolerance
442     * @return the new {@code BooleanBinding}
443     */
444    BooleanBinding isEqualTo(final int other, double epsilon);
445
446    // ===============================================================
447    // IsNotEqualTo
448
449    /**
450     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
451     * if this and another {@link javafx.beans.value.ObservableNumberValue} are
452     * not equal.
453     * <p>
454     * When comparing floating-point numbers it is recommended to use the
455     * {@link #isNotEqualTo(ObservableNumberValue, double) isNotEqualTo()}
456     * method that allows a small tolerance.
457     * 
458     * @param other
459     *            the second {@code ObservableNumberValue}
460     * @return the new {@code BooleanBinding}
461     * @throws NullPointerException
462     *             if the other {@code ObservableNumberValue} is {@code null}
463     */
464    BooleanBinding isNotEqualTo(final ObservableNumberValue other);
465
466    /**
467     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
468     * if this and another {@link javafx.beans.value.ObservableNumberValue} are
469     * not equal (with a tolerance).
470     * <p>
471     * Two operands {@code a} and {@code b} are considered not equal if
472     * {@code Math.abs(a-b) > epsilon}.
473     * <p>
474     * Allowing a small tolerance is recommended when comparing floating-point
475     * numbers because of rounding-errors.
476     * 
477     * @param other
478     *            the second {@code ObservableNumberValue}
479     * @param epsilon
480     *            the permitted tolerance
481     * @return the new {@code BooleanBinding}
482     * @throws NullPointerException
483     *             if the other {@code ObservableNumberValue} is {@code null}
484     */
485    BooleanBinding isNotEqualTo(final ObservableNumberValue other,
486            double epsilon);
487
488    /**
489     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
490     * if this {@code NumberExpression} is not equal to a constant value (with a
491     * tolerance).
492     * <p>
493     * Two operands {@code a} and {@code b} are considered not equal if
494     * {@code Math.abs(a-b) > epsilon}.
495     * <p>
496     * Allowing a small tolerance is recommended when comparing floating-point
497     * numbers.
498     * 
499     * @param other
500     *            the constant value
501     * @param epsilon
502     *            the permitted tolerance
503     * @return the new {@code BooleanBinding}
504     */
505    BooleanBinding isNotEqualTo(final double other, double epsilon);
506
507    /**
508     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
509     * if this {@code NumberExpression} is not equal to a constant value (with a
510     * tolerance).
511     * <p>
512     * Two operands {@code a} and {@code b} are considered not equal if
513     * {@code Math.abs(a-b) > epsilon}.
514     * <p>
515     * Allowing a small tolerance is recommended when comparing floating-point
516     * numbers.
517     * 
518     * @param other
519     *            the constant value
520     * @param epsilon
521     *            the permitted tolerance
522     * @return the new {@code BooleanBinding}
523     */
524    BooleanBinding isNotEqualTo(final float other, double epsilon);
525
526    /**
527     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
528     * if this {@code NumberExpression} is not equal to a constant value.
529     * <p>
530     * When comparing floating-point numbers it is recommended to use the
531     * {@link #isNotEqualTo(long, double) isNotEqualTo()} method that allows a
532     * small tolerance.
533     * 
534     * @param other
535     *            the constant value
536     * @return the new {@code BooleanBinding}
537     */
538    BooleanBinding isNotEqualTo(final long other);
539
540    /**
541     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
542     * if this {@code NumberExpression} is not equal to a constant value (with a
543     * tolerance).
544     * <p>
545     * Two operands {@code a} and {@code b} are considered not equal if
546     * {@code Math.abs(a-b) > epsilon}.
547     * <p>
548     * Allowing a small tolerance is recommended when comparing floating-point
549     * numbers.
550     * 
551     * @param other
552     *            the constant value
553     * @param epsilon
554     *            the permitted tolerance
555     * @return the new {@code BooleanBinding}
556     */
557    BooleanBinding isNotEqualTo(final long other, double epsilon);
558
559    /**
560     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
561     * if this {@code NumberExpression} is not equal to a constant value.
562     * <p>
563     * When comparing floating-point numbers it is recommended to use the
564     * {@link #isNotEqualTo(int, double) isNotEqualTo()} method that allows a
565     * small tolerance.
566     * 
567     * @param other
568     *            the constant value
569     * @return the new {@code BooleanBinding}
570     */
571    BooleanBinding isNotEqualTo(final int other);
572
573    /**
574     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
575     * if this {@code NumberExpression} is not equal to a constant value (with a
576     * tolerance).
577     * <p>
578     * Two operands {@code a} and {@code b} are considered not equal if
579     * {@code Math.abs(a-b) > epsilon}.
580     * <p>
581     * Allowing a small tolerance is recommended when comparing floating-point
582     * numbers.
583     * 
584     * @param other
585     *            the constant value
586     * @param epsilon
587     *            the permitted tolerance
588     * @return the new {@code BooleanBinding}
589     */
590    BooleanBinding isNotEqualTo(final int other, double epsilon);
591
592    // ===============================================================
593    // IsGreaterThan
594
595    /**
596     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
597     * if this {@code NumberExpression} is greater than another
598     * {@link javafx.beans.value.ObservableNumberValue}.
599     * 
600     * @param other
601     *            the second {@code ObservableNumberValue}
602     * @return the new {@code BooleanBinding}
603     * @throws NullPointerException
604     *             if the other {@code ObservableNumberValue} is {@code null}
605     */
606    BooleanBinding greaterThan(final ObservableNumberValue other);
607
608    /**
609     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
610     * if this {@code NumberExpression} is greater than a constant value.
611     * 
612     * @param other
613     *            the constant value
614     * @return the new {@code BooleanBinding}
615     */
616    BooleanBinding greaterThan(final double other);
617
618    /**
619     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
620     * if this {@code NumberExpression} is greater than a constant value.
621     * 
622     * @param other
623     *            the constant value
624     * @return the new {@code BooleanBinding}
625     */
626    BooleanBinding greaterThan(final float other);
627
628    /**
629     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
630     * if this {@code NumberExpression} is greater than a constant value.
631     * 
632     * @param other
633     *            the constant value
634     * @return the new {@code BooleanBinding}
635     */
636    BooleanBinding greaterThan(final long other);
637
638    /**
639     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
640     * if this {@code NumberExpression} is greater than a constant value.
641     * 
642     * @param other
643     *            the constant value
644     * @return the new {@code BooleanBinding}
645     */
646    BooleanBinding greaterThan(final int other);
647
648    // ===============================================================
649    // IsLesserThan
650
651    /**
652     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
653     * if this {@code NumberExpression} is lesser than another
654     * {@link javafx.beans.value.ObservableNumberValue}.
655     * 
656     * @param other
657     *            the second {@code ObservableNumberValue}
658     * @return the new {@code BooleanBinding}
659     * @throws NullPointerException
660     *             if the other {@code ObservableNumberValue} is {@code null}
661     */
662    BooleanBinding lessThan(final ObservableNumberValue other);
663
664    /**
665     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
666     * if this {@code NumberExpression} is lesser than a constant value.
667     * 
668     * @param other
669     *            the constant value
670     * @return the new {@code BooleanBinding}
671     */
672    BooleanBinding lessThan(final double other);
673
674    /**
675     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
676     * if this {@code NumberExpression} is lesser than a constant value.
677     * 
678     * @param other
679     *            the constant value
680     * @return the new {@code BooleanBinding}
681     */
682    BooleanBinding lessThan(final float other);
683
684    /**
685     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
686     * if this {@code NumberExpression} is lesser than a constant value.
687     * 
688     * @param other
689     *            the constant value
690     * @return the new {@code BooleanBinding}
691     */
692    BooleanBinding lessThan(final long other);
693
694    /**
695     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
696     * if this {@code NumberExpression} is lesser than a constant value.
697     * 
698     * @param other
699     *            the constant value
700     * @return the new {@code BooleanBinding}
701     */
702    BooleanBinding lessThan(final int other);
703
704    // ===============================================================
705    // IsGreaterThanOrEqualTo
706
707    /**
708     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
709     * if this {@code NumberExpression} is greater than or equal to another
710     * {@link javafx.beans.value.ObservableNumberValue}.
711     * 
712     * @param other
713     *            the second {@code ObservableNumberValue}
714     * @return the new {@code BooleanBinding}
715     * @throws NullPointerException
716     *             if the other {@code ObservableNumberValue} is {@code null}
717     */
718    BooleanBinding greaterThanOrEqualTo(final ObservableNumberValue other);
719
720    /**
721     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
722     * if this {@code NumberExpression} is greater than or equal to a constant
723     * value.
724     * 
725     * @param other
726     *            the constant value
727     * @return the new {@code BooleanBinding}
728     */
729    BooleanBinding greaterThanOrEqualTo(final double other);
730
731    /**
732     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
733     * if this {@code NumberExpression} is greater than or equal to a constant
734     * value.
735     * 
736     * @param other
737     *            the constant value
738     * @return the new {@code BooleanBinding}
739     */
740    BooleanBinding greaterThanOrEqualTo(final float other);
741
742    /**
743     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
744     * if this {@code NumberExpression} is greater than or equal to a constant
745     * value.
746     * 
747     * @param other
748     *            the constant value
749     * @return the new {@code BooleanBinding}
750     */
751    BooleanBinding greaterThanOrEqualTo(final long other);
752
753    /**
754     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
755     * if this {@code NumberExpression} is greater than or equal to a constant
756     * value.
757     * 
758     * @param other
759     *            the constant value
760     * @return the new {@code BooleanBinding}
761     */
762    BooleanBinding greaterThanOrEqualTo(final int other);
763
764    // ===============================================================
765    // IsLessThanOrEqualTo
766
767    /**
768     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
769     * if this {@code NumberExpression} is less than or equal to another
770     * {@link javafx.beans.value.ObservableNumberValue}.
771     * 
772     * @param other
773     *            the second {@code ObservableNumberValue}
774     * @return the new {@code BooleanBinding}
775     * @throws NullPointerException
776     *             if the other {@code ObservableNumberValue} is {@code null}
777     */
778    BooleanBinding lessThanOrEqualTo(final ObservableNumberValue other);
779
780    /**
781     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
782     * if this {@code NumberExpression} is less than or equal to a constant
783     * value.
784     * 
785     * @param other
786     *            the constant value
787     * @return the new {@code BooleanBinding}
788     */
789    BooleanBinding lessThanOrEqualTo(final double other);
790
791    /**
792     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
793     * if this {@code NumberExpression} is less than or equal to a constant
794     * value.
795     * 
796     * @param other
797     *            the constant value
798     * @return the new {@code BooleanBinding}
799     */
800    BooleanBinding lessThanOrEqualTo(final float other);
801
802    /**
803     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
804     * if this {@code NumberExpression} is less than or equal to a constant
805     * value.
806     * 
807     * @param other
808     *            the constant value
809     * @return the new {@code BooleanBinding}
810     */
811    BooleanBinding lessThanOrEqualTo(final long other);
812
813    /**
814     * Creates a new {@link javafx.beans.binding.BooleanBinding} that holds {@code true}
815     * if this {@code NumberExpression} is less than or equal to a constant
816     * value.
817     * 
818     * @param other
819     *            the constant value
820     * @return the new {@code BooleanBinding}
821     */
822    BooleanBinding lessThanOrEqualTo(final int other);
823
824    // ===============================================================
825    // String conversions
826
827    /**
828     * Creates a {@link javafx.beans.binding.StringBinding} that holds the value
829     * of the {@code NumberExpression} turned into a {@code String}. If the
830     * value of this {@code NumberExpression} changes, the value of the
831     * {@code StringBinding} will be updated automatically.
832     * <p>
833     * The conversion is done without any formatting applied.
834     * 
835     * @return the new {@code StringBinding}
836     */
837    StringBinding asString();
838
839    /**
840     * Creates a {@link javafx.beans.binding.StringBinding} that holds the value
841     * of the {@code NumberExpression} turned into a {@code String}. If the
842     * value of this {@code NumberExpression} changes, the value of the
843     * {@code StringBinding} will be updated automatically.
844     * <p>
845     * The result is formatted according to the formatting {@code String}. See
846     * {@code java.util.Formatter} for formatting rules.
847     * 
848     * @param format
849     *            the formatting {@code String}
850     * @return the new {@code StringBinding}
851     */
852    StringBinding asString(String format);
853
854    /**
855     * Creates a {@link javafx.beans.binding.StringBinding} that holds the value
856     * of the {@code NumberExpression} turned into a {@code String}. If the
857     * value of this {@code NumberExpression} changes, the value of the
858     * {@code StringBinding} will be updated automatically.
859     * <p>
860     * The result is formatted according to the formatting {@code String} and
861     * the passed in {@code Locale}. See {@code java.util.Formatter} for
862     * formatting rules. See {@code java.util.Locale} for details on
863     * {@code Locale}.
864     * 
865     * @param format
866     *            the formatting {@code String}
867     * @return the new {@code StringBinding}
868     */
869    StringBinding asString(Locale locale, String format);
870}