001/** 002 * AbstractIntegerPrimitive.java 003 * 004 * Copyright (c) 2004-2012, Nicole C. Tedesco. All rights reserved. 005 * 006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not 007 * use this file except in compliance with the License. You may obtain a copy of 008 * the License at: 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, software 013 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT 014 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 015 * License for the specific language governing permissions and limitations under 016 * the License. 017 */ 018 019package net.sf.jaccumulator.integers; 020 021import java.math.BigDecimal; 022import java.math.BigInteger; 023import java.util.NoSuchElementException; 024 025import net.sf.jaccumulator.Domain; 026import net.sf.jaccumulator.lex.To; 027import net.sf.jaccumulator.primitives.AbstractNumericPrimitive; 028import net.sf.jaccumulator.primitives.Constant; 029import net.sf.jaccumulator.primitives.Primitive; 030import net.sf.jaccumulator.primitives.SealedPrimitive; 031import net.sf.jaccumulator.reals.Real; 032import net.sf.jaccumulator.reals.SealedReal; 033import net.sf.jaccumulator.scalars.NumericPrecision; 034import net.sf.jaccumulator.scalars.RoundingStrategy; 035import net.sf.jaccumulator.scalars.Scalar; 036import net.sf.jaccumulator.scalars.SealedScalar; 037 038/** 039 * Abstract {@code int} precision {@link Primitive primitive} implementation 040 * 041 * @param <PRIMITIVE> 042 * this primitive type (used to facilitate operation chaining on write 043 * operations) 044 * @since JAccumulator 4.0 045 * @author Nicole Tedesco (<a 046 * href="mailto:Nicole@NicoleTedesco.com">Nicole@NicoleTedesco.com</a>) 047 */ 048public abstract class AbstractIntegerPrimitive<PRIMITIVE extends Primitive<PRIMITIVE>> 049 extends 050 AbstractNumericPrimitive<PRIMITIVE> 051{ 052 private static final long serialVersionUID = -8999519980339974455L; 053 054 public AbstractIntegerPrimitive() 055 { 056 super(NumericPrecision.INTEGER); 057 } 058 059 public AbstractIntegerPrimitive( final Domain aDomain ) 060 { 061 super(aDomain, NumericPrecision.INTEGER); 062 } 063 064 @Override 065 public PRIMITIVE absoluteValue() 066 throws UnsupportedOperationException, 067 ArithmeticException, 068 IllegalArgumentException 069 { 070 return this.setScalar(Math.abs(this.intValue())); 071 } 072 073 @Override 074 public final PRIMITIVE and( final boolean aValue ) 075 throws UnsupportedOperationException, 076 IllegalArgumentException, 077 ArithmeticException 078 { 079 return this.and(To.intValue(aValue)); 080 } 081 082 @Override 083 public final PRIMITIVE and( final byte aValue ) 084 throws UnsupportedOperationException, 085 IllegalArgumentException, 086 ArithmeticException 087 { 088 return this.setScalar(this.intValue() & aValue); 089 } 090 091 @Override 092 public final PRIMITIVE and( final char aValue ) 093 throws UnsupportedOperationException, 094 IllegalArgumentException, 095 ArithmeticException 096 { 097 return this.setScalar(this.intValue() & aValue); 098 } 099 100 @Override 101 public final PRIMITIVE and( final short aValue ) 102 throws UnsupportedOperationException, 103 IllegalArgumentException, 104 ArithmeticException 105 { 106 return this.setScalar(this.intValue() & aValue); 107 } 108 109 @Override 110 public final boolean booleanPostDecrement() 111 throws UnsupportedOperationException, 112 ArithmeticException, 113 IllegalArgumentException 114 { 115 return To.booleanValue(this.intPostDecrement()); 116 } 117 118 @Override 119 public final boolean booleanPostIncrement() 120 throws UnsupportedOperationException, 121 ArithmeticException, 122 IllegalArgumentException 123 { 124 return To.booleanValue(this.intPostIncrement()); 125 } 126 127 @Override 128 public final boolean booleanValue() 129 { 130 return To.booleanValue(this.intValue()); 131 } 132 133 @Override 134 public final byte bytePostDecrement() 135 throws UnsupportedOperationException, 136 ArithmeticException, 137 IllegalArgumentException 138 { 139 return (byte)this.intPostDecrement(); 140 } 141 142 @Override 143 public final byte bytePostIncrement() 144 throws UnsupportedOperationException, 145 ArithmeticException, 146 IllegalArgumentException 147 { 148 return (byte)this.intPostIncrement(); 149 } 150 151 @Override 152 public final byte byteValue() 153 { 154 return (byte)this.intValue(); 155 } 156 157 @Override 158 public final char charPostDecrement() 159 throws UnsupportedOperationException, 160 ArithmeticException, 161 IllegalArgumentException 162 { 163 return (char)this.intPostDecrement(); 164 } 165 166 @Override 167 public final char charPostIncrement() 168 throws UnsupportedOperationException, 169 ArithmeticException, 170 IllegalArgumentException 171 { 172 return (char)this.intPostIncrement(); 173 } 174 175 @Override 176 public final char charValue() 177 { 178 return (char)this.intValue(); 179 } 180 181 @Override 182 public final PRIMITIVE copyUsing( final BigDecimal aValue ) 183 { 184 return this.copyUsing(aValue.intValue()); 185 } 186 187 @Override 188 public final PRIMITIVE copyUsing( final BigInteger aValue ) 189 { 190 return this.copyUsing(aValue.intValue()); 191 } 192 193 @Override 194 public final PRIMITIVE copyUsing( final boolean aValue ) 195 { 196 return this.copyUsing(To.intValue(aValue)); 197 } 198 199 @Override 200 public final PRIMITIVE copyUsing( final byte aValue ) 201 { 202 return this.copyUsing((int)aValue); 203 } 204 205 @Override 206 public final PRIMITIVE copyUsing( final char aValue ) 207 { 208 return this.copyUsing((int)aValue); 209 } 210 211 @Override 212 public final PRIMITIVE copyUsing( final double aValue ) 213 { 214 return this.copyUsing((int)aValue); 215 } 216 217 @Override 218 public final PRIMITIVE copyUsing( final float aValue ) 219 { 220 return this.copyUsing((int)aValue); 221 } 222 223 @Override 224 public final PRIMITIVE copyUsing( final long aValue ) 225 { 226 return this.copyUsing((int)aValue); 227 } 228 229 @Override 230 public final PRIMITIVE copyUsing( final short aValue ) 231 { 232 return this.copyUsing((int)aValue); 233 } 234 235 @Override 236 public final PRIMITIVE copyUsingPrimitive( final SealedPrimitive<?> aValue ) 237 { 238 return this.copyUsing(aValue.intValue()); 239 } 240 241 @Override 242 public final PRIMITIVE copyUsingReal( final SealedReal<?> aValue ) 243 { 244 return this.copyUsing(aValue.intValue()); 245 } 246 247 @Override 248 public final PRIMITIVE copyUsingScalar( final SealedScalar<?> aValue ) 249 { 250 return this.copyUsing(aValue.intValue()); 251 } 252 253 @Override 254 public final PRIMITIVE cube() 255 throws UnsupportedOperationException, 256 IllegalArgumentException, 257 ArithmeticException 258 { 259 final int myValue = this.intValue(); 260 return this.setScalar(myValue * myValue * myValue); 261 } 262 263 @Override 264 public final PRIMITIVE difference( final boolean aValue ) 265 throws UnsupportedOperationException, 266 IllegalArgumentException, 267 ArithmeticException 268 { 269 return this.difference(To.intValue(aValue)); 270 } 271 272 @Override 273 public final PRIMITIVE difference( final byte aValue ) 274 throws UnsupportedOperationException, 275 IllegalArgumentException, 276 ArithmeticException 277 { 278 return this.setScalar(this.intValue() - aValue); 279 } 280 281 @Override 282 public final PRIMITIVE difference( final char aValue ) 283 throws UnsupportedOperationException, 284 IllegalArgumentException, 285 ArithmeticException 286 { 287 return this.setScalar(this.intValue() - aValue); 288 } 289 290 @Override 291 public final PRIMITIVE difference( final short aValue ) 292 throws UnsupportedOperationException, 293 IllegalArgumentException, 294 ArithmeticException 295 { 296 return this.setScalar(this.intValue() - aValue); 297 } 298 299 @Override 300 public final double doublePostDecrement() 301 throws UnsupportedOperationException, 302 ArithmeticException, 303 IllegalArgumentException 304 { 305 return this.intPostDecrement(); 306 } 307 308 @Override 309 public final double doublePostIncrement() 310 throws UnsupportedOperationException, 311 ArithmeticException, 312 IllegalArgumentException 313 { 314 return this.intPostIncrement(); 315 } 316 317 @Override 318 public final double doubleValue() 319 { 320 return this.intValue(); 321 } 322 323 @Override 324 public final float floatPostDecrement() 325 throws UnsupportedOperationException, 326 ArithmeticException, 327 IllegalArgumentException 328 { 329 return this.intPostDecrement(); 330 } 331 332 @Override 333 public final float floatPostIncrement() 334 throws UnsupportedOperationException, 335 ArithmeticException, 336 IllegalArgumentException 337 { 338 return this.intPostIncrement(); 339 } 340 341 @Override 342 public final float floatValue() 343 { 344 return this.intValue(); 345 } 346 347 @Override 348 public int hashCode() 349 { 350 return hashCode(this.intValue()); 351 } 352 353 @Override 354 @SuppressWarnings( "unchecked" ) 355 public final <S extends Scalar<?>> S inducePostDecrement( final S aTarget ) 356 throws NullPointerException, 357 NoSuchElementException, 358 UnsupportedOperationException, 359 IllegalStateException 360 { 361 return (S)aTarget.setScalar(this.intPostDecrement()); 362 } 363 364 @Override 365 @SuppressWarnings( "unchecked" ) 366 public final <S extends Scalar<?>> S inducePostIncrement( final S aTarget ) 367 throws NullPointerException, 368 NoSuchElementException, 369 UnsupportedOperationException, 370 IllegalStateException 371 { 372 return (S)aTarget.setScalar(this.intPostIncrement()); 373 } 374 375 @Override 376 public final <REAL extends Real<?>> REAL induceRealMaximum( 377 final REAL aTarget ) 378 throws NullPointerException, 379 NoSuchElementException, 380 UnsupportedOperationException, 381 IllegalStateException 382 { 383 return this.induceScalarMaximum(aTarget); 384 } 385 386 @Override 387 public final <REAL extends Real<?>> REAL induceRealMinimum( 388 final REAL aTarget ) 389 throws NullPointerException, 390 NoSuchElementException, 391 UnsupportedOperationException, 392 IllegalStateException 393 { 394 return this.induceScalarMinimum(aTarget); 395 } 396 397 @Override 398 public final <REAL extends Real<?>> REAL induceRealValue( final REAL aTarget ) 399 throws NullPointerException, 400 NoSuchElementException, 401 UnsupportedOperationException, 402 IllegalStateException 403 { 404 return this.induceScalarValue(aTarget); 405 } 406 407 @Override 408 @SuppressWarnings( "unchecked" ) 409 public <S extends Scalar<?>> S induceScalarMaximum( final S aTarget ) 410 { 411 return (S)aTarget.setScalar(Integer.MAX_VALUE); 412 } 413 414 @Override 415 @SuppressWarnings( "unchecked" ) 416 public <S extends Scalar<?>> S induceScalarMinimum( final S aTarget ) 417 { 418 return (S)aTarget.setScalar(Integer.MIN_VALUE); 419 } 420 421 @Override 422 @SuppressWarnings( "unchecked" ) 423 public final <S extends Scalar<?>> S induceScalarValue( final S aTarget ) 424 { 425 return (S)aTarget.setScalar(this.intValue()); 426 } 427 428 @Override 429 public PRIMITIVE inverse() 430 throws UnsupportedOperationException, 431 ArithmeticException, 432 IllegalArgumentException 433 { 434 if (this.isZero()) return this.quotient(0); 435 return this.setUnity(); 436 } 437 438 @Override 439 public final boolean isFinite() 440 { 441 return true; 442 } 443 444 @Override 445 public final boolean isInfinity() 446 { 447 return false; 448 } 449 450 @Override 451 public boolean isInvalid() 452 { 453 return false; 454 } 455 456 @Override 457 public boolean isMaximum() 458 { 459 return this.intValue() == Integer.MAX_VALUE; 460 } 461 462 @Override 463 public boolean isMinimum() 464 { 465 return this.intValue() == Integer.MIN_VALUE; 466 } 467 468 @Override 469 public boolean isModulo() 470 { 471 return false; 472 } 473 474 @Override 475 public final boolean isNegative() 476 { 477 return this.intValue() < 0; 478 } 479 480 @Override 481 public final boolean isNegativeFinite() 482 { 483 return this.isNegative(); 484 } 485 486 @Override 487 public final boolean isNegativeInfinity() 488 { 489 return false; 490 } 491 492 @Override 493 public final boolean isPositive() 494 { 495 return 0 < this.intValue(); 496 } 497 498 @Override 499 public final boolean isPositiveFinite() 500 { 501 return this.isPositive(); 502 } 503 504 @Override 505 public final boolean isPositiveInfinity() 506 { 507 return false; 508 } 509 510 @Override 511 public final boolean isReal() 512 { 513 return true; 514 } 515 516 @Override 517 public final boolean isUnity() 518 { 519 return this.intValue() == 1; 520 } 521 522 @Override 523 public final boolean isZero() 524 { 525 return this.intValue() == 0; 526 } 527 528 @Override 529 public final long longPostDecrement() 530 throws UnsupportedOperationException, 531 ArithmeticException, 532 IllegalArgumentException 533 { 534 return this.intPostDecrement(); 535 } 536 537 @Override 538 public final long longPostIncrement() 539 throws UnsupportedOperationException, 540 ArithmeticException, 541 IllegalArgumentException 542 { 543 return this.intPostIncrement(); 544 } 545 546 @Override 547 public final long longValue() 548 { 549 return this.intValue(); 550 } 551 552 @Override 553 public final PRIMITIVE negate() 554 throws UnsupportedOperationException, 555 ArithmeticException, 556 IllegalArgumentException 557 { 558 return this.setScalar(-this.intValue()); 559 } 560 561 @Override 562 public final PRIMITIVE or( final boolean aValue ) 563 throws UnsupportedOperationException, 564 IllegalArgumentException, 565 ArithmeticException 566 { 567 return this.or(To.intValue(aValue)); 568 } 569 570 @Override 571 public final PRIMITIVE or( final byte aValue ) 572 throws UnsupportedOperationException, 573 IllegalArgumentException, 574 ArithmeticException 575 { 576 return this.setScalar(this.intValue() | aValue); 577 } 578 579 @Override 580 public final PRIMITIVE or( final char aValue ) 581 throws UnsupportedOperationException, 582 IllegalArgumentException, 583 ArithmeticException 584 { 585 return this.setScalar(this.intValue() | aValue); 586 } 587 588 @Override 589 public final PRIMITIVE or( final short aValue ) 590 throws UnsupportedOperationException, 591 IllegalArgumentException, 592 ArithmeticException 593 { 594 return this.setScalar(this.intValue() | aValue); 595 } 596 597 @Override 598 public final PRIMITIVE product( final boolean aValue ) 599 throws UnsupportedOperationException, 600 IllegalArgumentException, 601 ArithmeticException 602 { 603 return this.product(To.intValue(aValue)); 604 } 605 606 @Override 607 public final PRIMITIVE product( final byte aValue ) 608 throws UnsupportedOperationException, 609 IllegalArgumentException, 610 ArithmeticException 611 { 612 return this.setScalar(this.intValue() * aValue); 613 } 614 615 @Override 616 public final PRIMITIVE product( final char aValue ) 617 throws UnsupportedOperationException, 618 IllegalArgumentException, 619 ArithmeticException 620 { 621 return this.setScalar(this.intValue() * aValue); 622 } 623 624 @Override 625 public final PRIMITIVE product( final short aValue ) 626 throws UnsupportedOperationException, 627 IllegalArgumentException, 628 ArithmeticException 629 { 630 return this.setScalar(this.intValue() * aValue); 631 } 632 633 @Override 634 public final PRIMITIVE quotient( final boolean aValue ) 635 throws UnsupportedOperationException, 636 IllegalArgumentException, 637 ArithmeticException 638 { 639 return this.quotient(To.intValue(aValue)); 640 } 641 642 @Override 643 public final PRIMITIVE quotient( final byte aValue ) 644 throws UnsupportedOperationException, 645 IllegalArgumentException, 646 ArithmeticException 647 { 648 return this.setScalar(this.intValue() / aValue); 649 } 650 651 @Override 652 public final PRIMITIVE quotient( final char aValue ) 653 throws UnsupportedOperationException, 654 IllegalArgumentException, 655 ArithmeticException 656 { 657 return this.setScalar(this.intValue() / aValue); 658 } 659 660 @Override 661 public final PRIMITIVE quotient( final short aValue ) 662 throws UnsupportedOperationException, 663 IllegalArgumentException, 664 ArithmeticException 665 { 666 return this.setScalar(this.intValue() / aValue); 667 } 668 669 @Override 670 @SuppressWarnings( "unchecked" ) 671 public final PRIMITIVE round( final RoundingStrategy aRoundingStrategy ) 672 throws UnsupportedOperationException, 673 IllegalArgumentException, 674 ArithmeticException, 675 NullPointerException 676 { 677 return (PRIMITIVE)this; 678 } 679 680 @Override 681 public PRIMITIVE setMaximum() 682 throws UnsupportedOperationException, 683 ArithmeticException, 684 IllegalArgumentException 685 { 686 return this.setScalar(Integer.MAX_VALUE); 687 } 688 689 @Override 690 public PRIMITIVE setMinimum() 691 throws UnsupportedOperationException, 692 ArithmeticException, 693 IllegalArgumentException 694 { 695 return this.setScalar(Integer.MIN_VALUE); 696 } 697 698 @Override 699 public PRIMITIVE setNumber( final Number aValue ) 700 throws UnsupportedOperationException, 701 IllegalArgumentException, 702 ArithmeticException, 703 NullPointerException 704 { 705 return this.setScalar(aValue.intValue()); 706 } 707 708 @Override 709 public PRIMITIVE setPrimitive( final SealedPrimitive<?> aValue ) 710 throws UnsupportedOperationException, 711 IllegalArgumentException, 712 ArithmeticException, 713 NullPointerException 714 { 715 return this.setScalar(aValue.intValue()); 716 } 717 718 @Override 719 public PRIMITIVE setReal( final BigDecimal aValue ) 720 throws UnsupportedOperationException, 721 IllegalArgumentException, 722 ArithmeticException, 723 NullPointerException 724 { 725 return this.setScalar(aValue.intValue()); 726 } 727 728 @Override 729 public PRIMITIVE setReal( final BigInteger aValue ) 730 throws UnsupportedOperationException, 731 IllegalArgumentException, 732 ArithmeticException, 733 NullPointerException 734 { 735 return this.setScalar(aValue.intValue()); 736 } 737 738 @Override 739 public PRIMITIVE setReal( final SealedReal<?> aValue ) 740 throws UnsupportedOperationException, 741 IllegalArgumentException, 742 ArithmeticException, 743 NullPointerException 744 { 745 return this.setScalar(aValue.intValue()); 746 } 747 748 @Override 749 public final PRIMITIVE setScalar( final boolean aValue ) 750 throws UnsupportedOperationException, 751 IllegalArgumentException, 752 ArithmeticException 753 { 754 return this.setScalar(To.intValue(aValue)); 755 } 756 757 @Override 758 public final PRIMITIVE setScalar( final byte aValue ) 759 throws UnsupportedOperationException, 760 IllegalArgumentException, 761 ArithmeticException 762 { 763 return this.setScalar((int)aValue); 764 } 765 766 @Override 767 public final PRIMITIVE setScalar( final char aValue ) 768 throws UnsupportedOperationException, 769 IllegalArgumentException, 770 ArithmeticException 771 { 772 return this.setScalar((int)aValue); 773 } 774 775 @Override 776 public PRIMITIVE setScalar( final double aValue ) 777 throws UnsupportedOperationException, 778 IllegalArgumentException, 779 ArithmeticException 780 { 781 return this.setScalar((int)aValue); 782 } 783 784 @Override 785 public PRIMITIVE setScalar( final float aValue ) 786 throws UnsupportedOperationException, 787 IllegalArgumentException, 788 ArithmeticException 789 { 790 return this.setScalar((int)aValue); 791 } 792 793 @Override 794 public PRIMITIVE setScalar( final long aValue ) 795 throws UnsupportedOperationException, 796 IllegalArgumentException, 797 ArithmeticException 798 { 799 return this.setScalar((int)aValue); 800 } 801 802 @Override 803 public PRIMITIVE setScalar( final SealedScalar<?> aValue ) 804 throws UnsupportedOperationException, 805 IllegalArgumentException, 806 ArithmeticException, 807 NullPointerException 808 { 809 return this.setScalar(aValue.intValue()); 810 } 811 812 @Override 813 public final PRIMITIVE setScalar( final short aValue ) 814 throws UnsupportedOperationException, 815 IllegalArgumentException, 816 ArithmeticException 817 { 818 return this.setScalar((int)aValue); 819 } 820 821 @Override 822 public final PRIMITIVE setUnity() 823 throws UnsupportedOperationException, 824 IllegalArgumentException, 825 ArithmeticException 826 { 827 return this.setScalar(1); 828 } 829 830 @Override 831 public final PRIMITIVE setZero() 832 throws UnsupportedOperationException, 833 IllegalArgumentException, 834 ArithmeticException 835 { 836 return this.setScalar(0); 837 } 838 839 @Override 840 public final short shortPostDecrement() 841 throws UnsupportedOperationException, 842 ArithmeticException, 843 IllegalArgumentException 844 { 845 return (short)this.intPostDecrement(); 846 } 847 848 @Override 849 public final short shortPostIncrement() 850 throws UnsupportedOperationException, 851 ArithmeticException, 852 IllegalArgumentException 853 { 854 return (short)this.intPostIncrement(); 855 } 856 857 @Override 858 public final short shortValue() 859 { 860 return (short)this.intValue(); 861 } 862 863 @Override 864 public final PRIMITIVE square() 865 throws UnsupportedOperationException, 866 IllegalArgumentException, 867 ArithmeticException 868 { 869 final int myValue = this.intValue(); 870 return this.setScalar(myValue * myValue); 871 } 872 873 @Override 874 public final PRIMITIVE sum( final boolean aValue ) 875 throws UnsupportedOperationException, 876 IllegalArgumentException, 877 ArithmeticException 878 { 879 return this.sum(To.intValue(aValue)); 880 } 881 882 @Override 883 public final PRIMITIVE sum( final byte aValue ) 884 throws UnsupportedOperationException, 885 IllegalArgumentException, 886 ArithmeticException 887 { 888 return this.setScalar(this.intValue() + aValue); 889 } 890 891 @Override 892 public final PRIMITIVE sum( final char aValue ) 893 throws UnsupportedOperationException, 894 IllegalArgumentException, 895 ArithmeticException 896 { 897 return this.setScalar(this.intValue() + aValue); 898 } 899 900 @Override 901 public final PRIMITIVE sum( final short aValue ) 902 throws UnsupportedOperationException, 903 IllegalArgumentException, 904 ArithmeticException 905 { 906 return this.setScalar(this.intValue() + aValue); 907 } 908 909 @Override 910 public final PRIMITIVE swapPrimitives( final Primitive<?> aPrimitive ) 911 { 912 final int myValue = this.intValue(); 913 final int aValue = aPrimitive.intValue(); 914 aPrimitive.setScalar(myValue); 915 return this.setScalar(aValue); 916 } 917 918 @Override 919 public final Number toNumber() 920 { 921 return Integer.valueOf(this.intValue()); 922 } 923 924 @Override 925 public String toString() 926 { 927 return String.valueOf(this.intValue()); 928 } 929 930 @Override 931 public final BigDecimal toUnlimitedDecimal() 932 { 933 return Constant.toUnlimitedDecimal(this.intValue()); 934 } 935 936 @Override 937 public final BigInteger toUnlimitedInteger() 938 { 939 return BigInteger.valueOf(this.intValue()); 940 } 941 942 @Override 943 public final BigDecimal unlimitedDecimalPostDecrement() 944 throws UnsupportedOperationException, 945 ArithmeticException, 946 IllegalArgumentException 947 { 948 return Constant.toUnlimitedDecimal(this.intPostDecrement()); 949 } 950 951 @Override 952 public final BigDecimal unlimitedDecimalPostIncrement() 953 throws UnsupportedOperationException, 954 ArithmeticException, 955 IllegalArgumentException 956 { 957 return Constant.toUnlimitedDecimal(this.intPostIncrement()); 958 } 959 960 @Override 961 public final BigInteger unlimitedIntegerPostDecrement() 962 throws UnsupportedOperationException, 963 ArithmeticException, 964 IllegalArgumentException 965 { 966 return Constant.toUnlimitedInteger(this.intPostDecrement()); 967 } 968 969 @Override 970 public final BigInteger unlimitedIntegerPostIncrement() 971 throws UnsupportedOperationException, 972 ArithmeticException, 973 IllegalArgumentException 974 { 975 return Constant.toUnlimitedInteger(this.intPostIncrement()); 976 } 977 978 @Override 979 public final PRIMITIVE xor( final boolean aValue ) 980 throws UnsupportedOperationException, 981 IllegalArgumentException, 982 ArithmeticException 983 { 984 return this.xor(To.intValue(aValue)); 985 } 986 987 @Override 988 public final PRIMITIVE xor( final byte aValue ) 989 throws UnsupportedOperationException, 990 IllegalArgumentException, 991 ArithmeticException 992 { 993 return this.setScalar(this.intValue() ^ aValue); 994 } 995 996 @Override 997 public final PRIMITIVE xor( final char aValue ) 998 throws UnsupportedOperationException, 999 IllegalArgumentException, 1000 ArithmeticException 1001 { 1002 return this.setScalar(this.intValue() ^ aValue); 1003 } 1004 1005 @Override 1006 public final PRIMITIVE xor( final short aValue ) 1007 throws UnsupportedOperationException, 1008 IllegalArgumentException, 1009 ArithmeticException 1010 { 1011 return this.setScalar(this.intValue() ^ aValue); 1012 } 1013}