X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.logic.core%2Fsrc%2Fnet%2Fmograsim%2Flogic%2Fcore%2Ftypes%2FBitVector.java;h=0bd5ae53e974eb44c38a2a103fb429f71860d4ab;hb=c6ad3a18e8a437d7b131b203267fe2723708641f;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..0bd5ae53 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,6 +23,9 @@ 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