fixes some checkstyle issues

This commit is contained in:
hneemann 2021-04-20 22:17:30 +02:00
parent d2ebb7781a
commit a6b092c184

View File

@ -7,30 +7,60 @@ package de.neemann.digital.builder.ATF150x;
import java.util.ArrayList;
/**
* Used to create a pin list
*/
public class PL {
private final ArrayList<Integer> pinList;
/**
* Creates a new instance
*/
public PL() {
pinList = new ArrayList<>();
}
/**
* Adds some pins to the list
*
* @param p the pin numbers to add
* @return this for chained calls
*/
public PL p(int... p) {
for (int j : p) pinList.add(j);
return this;
}
/**
* Excludes some pins to the list
*
* @param p the pin numbers to exclude
* @return this for chained calls
*/
public PL e(int... p) {
for (int j : p) pinList.remove((Object) j);
return this;
}
public PL pi(int a, int b) {
for (int i = a; i <= b; i++)
/**
* Adds a pin interval
*
* @param from min pin number
* @param to max pin number
* @return this for chained calls
*/
public PL pi(int from, int to) {
for (int i = from; i <= to; i++)
pinList.add(i);
return this;
}
/**
* Creates an int array
*
* @return the array
*/
public int[] pins() {
int[] pins = new int[pinList.size()];
for (int i = 0; i < pinList.size(); i++)