fixed some checkstyle issues

This commit is contained in:
hneemann 2016-11-24 19:41:11 +01:00
parent 60065ce442
commit d82d53829e
9 changed files with 15 additions and 15 deletions

View File

@ -6,9 +6,6 @@ import de.neemann.digital.core.Model;
import de.neemann.digital.core.Signal; import de.neemann.digital.core.Signal;
import de.neemann.digital.lang.Lang; import de.neemann.digital.lang.Lang;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.StringReader;
import java.util.*; import java.util.*;
/** /**

View File

@ -1,7 +1,6 @@
package de.neemann.digital.core.element; package de.neemann.digital.core.element;
import de.neemann.digital.core.NodeException; import de.neemann.digital.core.NodeException;
import de.neemann.digital.draw.elements.Pin;
import de.neemann.digital.draw.elements.PinException; import de.neemann.digital.draw.elements.PinException;
import de.neemann.digital.lang.Lang; import de.neemann.digital.lang.Lang;

View File

@ -24,12 +24,18 @@ public class PinDescriptions extends ImmutableList<PinDescription> {
super(observableValues); super(observableValues);
} }
public PinDescriptions setLangKey(String key) { /**
* Sets this key to the PinInfo instances of this list
*
* @param key the key to set
* @return this for chained calls
*/
PinDescriptions setLangKey(String key) {
for (PinDescription pd : this) { for (PinDescription pd : this) {
if (pd instanceof PinInfo) { if (pd instanceof PinInfo) {
((PinInfo)pd).setLangKey(key); ((PinInfo) pd).setLangKey(key);
} else { } else {
System.out.println("no PinInfo: "+pd.getClass().getSimpleName()); System.out.println("PinDescription id not a PinInfo but " + pd.getClass().getSimpleName());
} }
} }
return this; return this;

View File

@ -124,7 +124,12 @@ public class PinInfo implements PinDescription {
return this; return this;
} }
public void setLangKey(String key) { /**
* Sets the language key for this pin.
*
* @param key the key
*/
void setLangKey(String key) {
this.langKey = key + name; this.langKey = key + name;
} }
} }

View File

@ -5,7 +5,6 @@ import de.neemann.digital.core.element.Element;
import de.neemann.digital.core.element.ElementAttributes; import de.neemann.digital.core.element.ElementAttributes;
import de.neemann.digital.core.element.ElementTypeDescription; import de.neemann.digital.core.element.ElementTypeDescription;
import de.neemann.digital.core.element.Keys; import de.neemann.digital.core.element.Keys;
import de.neemann.digital.lang.Lang;
import static de.neemann.digital.core.element.PinInfo.input; import static de.neemann.digital.core.element.PinInfo.input;

View File

@ -8,7 +8,6 @@ import de.neemann.digital.core.element.Element;
import de.neemann.digital.core.element.ElementAttributes; import de.neemann.digital.core.element.ElementAttributes;
import de.neemann.digital.core.element.ElementTypeDescription; import de.neemann.digital.core.element.ElementTypeDescription;
import de.neemann.digital.core.element.Keys; import de.neemann.digital.core.element.Keys;
import de.neemann.digital.lang.Lang;
import java.util.ArrayList; import java.util.ArrayList;

View File

@ -8,7 +8,6 @@ import de.neemann.digital.draw.library.ElementNotFoundException;
import junit.framework.TestCase; import junit.framework.TestCase;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException; import java.io.IOException;
/** /**

View File

@ -1,7 +1,6 @@
package de.neemann.digital.integration; package de.neemann.digital.integration;
import de.neemann.digital.core.NodeException; import de.neemann.digital.core.NodeException;
import de.neemann.digital.core.memory.RAMSinglePort;
import de.neemann.digital.core.memory.Register; import de.neemann.digital.core.memory.Register;
import de.neemann.digital.draw.elements.PinException; import de.neemann.digital.draw.elements.PinException;
import de.neemann.digital.draw.library.ElementNotFoundException; import de.neemann.digital.draw.library.ElementNotFoundException;

View File

@ -1,9 +1,6 @@
package de.neemann.gui; package de.neemann.gui;
import junit.framework.TestCase; import junit.framework.TestCase;
import org.junit.Test;
import static org.junit.Assert.*;
/** /**
* Created by hneemann on 29.10.16. * Created by hneemann on 29.10.16.