mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-24 04:42:51 -04:00
fixes some checkstyle issues
This commit is contained in:
parent
d2ebb7781a
commit
a6b092c184
@ -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++)
|
||||
|
Loading…
x
Reference in New Issue
Block a user