X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=net.mograsim.machine%2Fsrc%2Fnet%2Fmograsim%2Fmachine%2Fmi%2Fparameters%2FParameterClassification.java;h=c81f6e556968361e55934d7d3b251e71dbc553de;hb=8bed58cd47f4e53a0a83e066d38864aa6875502f;hp=337340118e9d64a8d2b6363862fc46f79c4b2e85;hpb=e104b507f81eebed56d923d5b0629f72d68d8b5a;p=Mograsim.git diff --git a/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java b/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java index 33734011..c81f6e55 100644 --- a/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java +++ b/net.mograsim.machine/src/net/mograsim/machine/mi/parameters/ParameterClassification.java @@ -6,22 +6,25 @@ public interface ParameterClassification { /** * Determines whether a {@link MicroInstructionParameter} is part of this class of parameters. + * * @return true if the classification contains the Parameter, false otherwise */ public default boolean conforms(MicroInstructionParameter param) { return param.getType().equals(getExpectedType()) && param.getValue().length() == getExpectedBits(); } - + /** * @return The type of the parameters in this classification. */ public ParameterType getExpectedType(); - + /** * @return The number of bits of the parameters in this classification. */ public int getExpectedBits(); - + public MicroInstructionParameter parse(String toParse); + + public MicroInstructionParameter getDefault(); }