X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftypes%2FBitVector.java;h=6a36403475c1ef7a2f5d5296b98d9a5268f046b8;hb=add92039f433cd315f2087da9c1a0de899927d96;hp=e8a40988c62c92ec89efda689875d593c878c7b6;hpb=fe49b5d42af2f3cf8d2ca8e7d9a7b3fc0ac8c34d;p=Mograsim.git diff --git a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java index e8a40988..6a364034 100644 --- a/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java +++ b/net.mograsim.logic.core/src/net/mograsim/logic/core/types/BitVector.java @@ -61,14 +61,12 @@ public final class BitVector implements StrictLogicType, Iterable, Iterable, Iterable + * An empty BitVectorMutator must not be converted to BitVector or used to manipulate single bits until at least one two + * operand logic operation is performed. */ public static BitVectorMutator empty() { return new BitVectorMutator(null); } + /** + * @see #empty() + */ + public boolean isEmpty() + { + return bits == null; + } + /** * Produces the resulting, immutable {@link BitVector}
* @@ -311,6 +335,8 @@ public final class BitVector implements StrictLogicType, Iterable, Iterable, Iterable, Iterable, Iterable, Iterablefrom MSB to LSB (left to right). */