X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftypes%2FBitVector.java;h=f92401f0e6fc0e2a0f7eea699a0ea4c99dfb43d3;hb=f14ea37d69488dd51518a36413af7176916b8bd7;hp=1e87f9a43cba1c5ec9c4d181571843987b0d599b;hpb=07faf07e3acb8b2afdc2bf65a46bc868faaed0f8;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 1e87f9a4..f92401f0 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 @@ -140,7 +140,6 @@ public final class BitVector implements StrictLogicType, Iterable { private Bit[] bits; @@ -155,9 +154,16 @@ public final class BitVector implements StrictLogicType, Iterablewith all bits set to null. Use with care! + */ + public static BitVectorMutator ofLength(int length) + { + return new BitVectorMutator(new Bit[length]); + } + /** * Returns an empty mutator which has no bits set and will simply copy the values from the first binary operation performed. - * */ public static BitVectorMutator empty() { @@ -169,7 +175,7 @@ public final class BitVector implements StrictLogicType, Iterable, Iterable