001 /* 002 Galois, a framework to exploit amorphous data-parallelism in irregular 003 programs. 004 005 Copyright (C) 2010, The University of Texas at Austin. All rights reserved. 006 UNIVERSITY EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES CONCERNING THIS SOFTWARE 007 AND DOCUMENTATION, INCLUDING ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR ANY 008 PARTICULAR PURPOSE, NON-INFRINGEMENT AND WARRANTIES OF PERFORMANCE, AND ANY 009 WARRANTY THAT MIGHT OTHERWISE ARISE FROM COURSE OF DEALING OR USAGE OF TRADE. 010 NO WARRANTY IS EITHER EXPRESS OR IMPLIED WITH RESPECT TO THE USE OF THE 011 SOFTWARE OR DOCUMENTATION. Under no circumstances shall University be liable 012 for incidental, special, indirect, direct or consequential damages or loss of 013 profits, interruption of business, or related expenses which may arise from use 014 of Software or Documentation, including but not limited to those resulting from 015 defects in Software and/or Documentation, or loss or inaccuracy of data of any 016 kind. 017 018 File: MutableBoolean.java 019 020 */ 021 022 023 024 package util; 025 026 /** 027 * Object wrapper around a boolean 028 * 029 * 030 */ 031 public class MutableBoolean { 032 private boolean value; 033 034 /** 035 * Creates a new mutable boolean with value false 036 */ 037 public MutableBoolean() { 038 value = false; 039 } 040 041 /** 042 * Creates a new mutable boolean with the given value 043 * 044 * @param value the initial value 045 */ 046 public MutableBoolean(boolean value) { 047 this.value = value; 048 } 049 050 public boolean get() { 051 return value; 052 } 053 054 public void set(boolean value) { 055 this.value = value; 056 } 057 058 @Override 059 public String toString() { 060 return String.valueOf(value); 061 } 062 }