Exemplo n.º 1
0
		/// <summary>
		/// Creates a new AtomicBoolean with the given value as it's
		/// initial value.
		/// </summary>
		/// <param name="initialValue">
		/// The initial value. Defaults to <code>false</code>
		/// </param>
		public AtomicBoolean(bool initialValue = false)
		{
			if (initialValue)
			{
				this.value = True;
			}
			else
			{
				this.value = False;
			}
		}
Exemplo n.º 2
0
		// static constructor that initializes the static properties of the class
		// i.e. True and False
		static AtomicBoolean()
		{
			True = new BooleanReference(true);
			False = new BooleanReference(false);
		}