X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftypes%2FBitVector.java;h=4d5365a0188a95961a37e867b36046cfaf165ae9;hb=8cfe1f354deaabfb30b0893ec4bfed09eb090b54;hp=1e87f9a43cba1c5ec9c4d181571843987b0d599b;hpb=67c1d352795802dae0c045cedeed82c883819d4e;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..4d5365a0 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 @@ -23,7 +23,10 @@ public final class BitVector implements StrictLogicType, Iterable, Iterable { private Bit[] bits; @@ -155,9 +157,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 +178,7 @@ public final class BitVector implements StrictLogicType, Iterable, Iterable