001/** 002 * MutableBooleanValue.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"); 007 * you may not use this file except in compliance with the License. 008 * You may obtain a copy of 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, 014 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 015 * See the License for the specific language governing permissions and 016 * limitations under the License. 017 */ 018 019package net.sf.jaccumulator.booleans; 020 021/** 022 * A changeable {@code boolean} property value 023 * 024 * @param <VALUE> 025 * this value type (used to facilitate operation chaining) 026 * @since JAccumulator 4.0 027 * @author Nicole Tedesco (<a 028 * href="mailto:Nicole@NicoleTedesco.com">Nicole@NicoleTedesco.com</a>) 029 */ 030public interface MutableBooleanValue<VALUE extends MutableBooleanValue<VALUE>> 031{ 032 /** 033 * Decrement the scalar value of this object then return the original value 034 * prior to decrementing 035 * 036 * @return the original value of this scalar 037 * @throws UnsupportedOperationException 038 * if this object's value cannot be changed 039 * @throws IllegalArgumentException 040 * if the new value was incommensurate with this object's 041 * specification 042 * @throws ArithmeticException 043 * the new numeric value was incompatible with with algebraic 044 * interpretation of this object 045 */ 046 public boolean booleanPostDecrement() 047 throws UnsupportedOperationException, 048 ArithmeticException, 049 IllegalArgumentException; 050 051 /** 052 * Increment the scalar value of this object then return the original value 053 * prior to incrementing 054 * 055 * @return the original value of this scalar 056 * @throws UnsupportedOperationException 057 * if this object's value cannot be changed 058 * @throws IllegalArgumentException 059 * if the new value was incommensurate with this object's 060 * specification 061 * @throws ArithmeticException 062 * the new numeric value was incompatible with with algebraic 063 * interpretation of this object 064 */ 065 public boolean booleanPostIncrement() 066 throws UnsupportedOperationException, 067 ArithmeticException, 068 IllegalArgumentException; 069 070 /** 071 * Set this property to its equivalent of {@code true} and answer this 072 * object (facilitates chaining) 073 * 074 * @return this object (facilitates operation chaining) 075 * @throws UnsupportedOperationException 076 * if this object's value cannot be changed 077 * @throws ArithmeticException 078 * the new value was incompatible with with algebraic interpretation 079 * of this object 080 */ 081 public VALUE setFalse() 082 throws UnsupportedOperationException, 083 ArithmeticException; 084 085 /** 086 * Set this property to the specified {@code boolean} value and answer this 087 * object (facilitates chaining) 088 * 089 * @param aValue 090 * a {@code boolean} value 091 * @return this object (facilitates operation chaining) 092 * @throws UnsupportedOperationException 093 * if this object's value cannot be changed 094 * @throws IllegalArgumentException 095 * if the specified value was incommensurate with this object's 096 * specification 097 * @throws ArithmeticException 098 * the numeric value provided was incompatible with with algebraic 099 * interpretation of this object 100 */ 101 public VALUE setScalar( final boolean aValue ) 102 throws UnsupportedOperationException, 103 IllegalArgumentException, 104 ArithmeticException; 105 106 /** 107 * Set this property to its equivalent of {@code true} and answer this 108 * object (facilitates chaining) 109 * 110 * @return this object (facilitates operation chaining) 111 * @throws UnsupportedOperationException 112 * if this object's value cannot be changed 113 * @throws ArithmeticException 114 * the new value was incompatible with with algebraic interpretation 115 * of this object 116 */ 117 public VALUE setTrue() 118 throws UnsupportedOperationException, 119 ArithmeticException; 120}