Fixed a bug in Am2900; created dlatch8/80; relayouted some components
[Mograsim.git] / net.mograsim.logic.model / src / net / mograsim / logic / model / model / components / ModelComponent.java
index 9171ee8..d543c54 100644 (file)
@@ -168,17 +168,30 @@ public abstract class ModelComponent implements JSONSerializable
         * Returns the pin with the given name of this component.
         * 
         * @throws IllegalArgumentException if there is no pin with the given name
+        * @see #getPinOrNull(String)
         * 
         * @author Daniel Kirschten
         */
        public Pin getPin(String name)
        {
-               Pin pin = pinsByName.get(name);
+               Pin pin = getPinOrNull(name);
                if (pin == null)
                        throw new IllegalArgumentException("No pin with the name " + name);
                return pin;
        }
 
+       /**
+        * Returns the pin with the given name of this component, or <code>null</code> if there is no such pin.
+        * 
+        * @see #getPin(String)
+        * 
+        * @author Daniel Kirschten
+        */
+       public Pin getPinOrNull(String name)
+       {
+               return pinsByName.get(name);
+       }
+
        // high-level access
 
        /**