diff options
author | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
---|---|---|
committer | Matthew Newhook <matthew@zeroc.com> | 2014-10-20 11:40:05 -0230 |
commit | b51469b41167fb86ae2059a15cf0475c53fdda7b (patch) | |
tree | fc85d6ca2efd89c67e1e4e7438f437c3e08313f4 /java/src/Ice/ByteOptional.java | |
parent | Fixed (ICE-5695) - IceSSL: misleading exception (diff) | |
download | ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.bz2 ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.tar.xz ice-b51469b41167fb86ae2059a15cf0475c53fdda7b.zip |
Down with ant. From the gradle to the grave.
Diffstat (limited to 'java/src/Ice/ByteOptional.java')
-rw-r--r-- | java/src/Ice/ByteOptional.java | 106 |
1 files changed, 0 insertions, 106 deletions
diff --git a/java/src/Ice/ByteOptional.java b/java/src/Ice/ByteOptional.java deleted file mode 100644 index 0e7678026e9..00000000000 --- a/java/src/Ice/ByteOptional.java +++ /dev/null @@ -1,106 +0,0 @@ -// ********************************************************************** -// -// Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved. -// -// This copy of Ice is licensed to you under the terms described in the -// ICE_LICENSE file included in this distribution. -// -// ********************************************************************** - -package Ice; - -/** - * Manages an optional byte parameter. - **/ -public class ByteOptional -{ - /** - * The value defaults to unset. - **/ - public ByteOptional() - { - _isSet = false; - } - - /** - * Sets the value to the given argument. - * - * @param v The initial value. - **/ - public ByteOptional(byte v) - { - _value = v; - _isSet = true; - } - - /** - * Sets the value to a shallow copy of the given optional. - * - * @param opt The source value. - **/ - public ByteOptional(ByteOptional opt) - { - _value = opt._value; - _isSet = opt._isSet; - } - - /** - * Obtains the current value. - * - * @return The current value. - * @throws IllegalStateException If the value is not set. - **/ - public byte get() - { - if(!_isSet) - { - throw new IllegalStateException("no value is set"); - } - return _value; - } - - /** - * Sets the value to the given argument. - * - * @param v The new value. - **/ - public void set(byte v) - { - _value = v; - _isSet = true; - } - - /** - * If the given argument is set, this optional is set to a shallow copy of the argument, - * otherwise this optional is unset. - * - * @param opt The source value. - **/ - public void set(ByteOptional opt) - { - _value = opt._value; - _isSet = opt._isSet; - } - - /** - * Determines whether the value is set. - * - * @return True if the value is set, false otherwise. - **/ - public boolean isSet() - { - return _isSet; - } - - /** - * Unsets this value. - **/ - public void clear() - { - _isSet = false; - _value = 0; - } - - private byte _value; - private boolean _isSet; -} |