move interface to primitive types

This commit is contained in:
2021-02-27 13:59:00 +00:00
parent 71297c4e5a
commit b778940c83
25 changed files with 53 additions and 54 deletions

View File

@@ -93,7 +93,7 @@ abstract class AbstractTxStream extends HierNode implements IWaveform {
* @return the events at time
*/
@Override
public IEvent[] getEventsAtTime(Long time) {
public IEvent[] getEventsAtTime(long time) {
return events.get(time);
}
@@ -104,7 +104,7 @@ abstract class AbstractTxStream extends HierNode implements IWaveform {
* @return the events before time
*/
@Override
public IEvent[] getEventsBeforeTime(Long time) {
public IEvent[] getEventsBeforeTime(long time) {
EventEntry e = events.floorEntry(time);
if (e == null)
return new IEvent[] {};
@@ -128,7 +128,7 @@ abstract class AbstractTxStream extends HierNode implements IWaveform {
* @return the id
*/
@Override
public Long getId() {
public long getId() {
return id;
}

View File

@@ -131,7 +131,7 @@ public class TextDbLoader implements IWaveformDbLoader {
* @return the max time
*/
@Override
public Long getMaxTime() {
public long getMaxTime() {
return maxTime;
}

View File

@@ -102,11 +102,11 @@ class Tx implements ITx {
*/
@Override
public int compareTo(ITx o) {
int res = getBeginTime().compareTo(o.getBeginTime());
int res = Long.compare(getBeginTime(), o.getBeginTime());
if (res != 0)
return res;
else
return getId().compareTo(o.getId());
return Long.compare(getId(), o.getId());
}
/**
@@ -150,7 +150,7 @@ class Tx implements ITx {
* @return the id
*/
@Override
public Long getId() {
public long getId() {
return getScvTx().id;
}
@@ -180,7 +180,7 @@ class Tx implements ITx {
* @return the begin time
*/
@Override
public Long getBeginTime() {
public long getBeginTime() {
if (beginTime < 0) {
ScvTx tx = scvTx==null?loader.getScvTx(id):getScvTx();
beginTime = tx.beginTime;
@@ -195,7 +195,7 @@ class Tx implements ITx {
* @return the end time
*/
@Override
public Long getEndTime() {
public long getEndTime() {
if (endTime < 0) {
ScvTx tx = scvTx==null?loader.getScvTx(id):getScvTx();
beginTime = tx.beginTime;

View File

@@ -95,7 +95,7 @@ class TxEvent implements ITxEvent {
* @return the time
*/
@Override
public Long getTime() {
public long getTime() {
return time;
}

View File

@@ -52,7 +52,7 @@ class TxGenerator extends AbstractTxStream {
*/
@Override
public boolean isSame(IWaveform other) {
return (other instanceof TxGenerator && this.getId().equals(other.getId()));
return (other instanceof TxGenerator && this.getId()==other.getId());
}
/**

View File

@@ -42,7 +42,7 @@ class TxStream extends AbstractTxStream {
*/
@Override
public boolean isSame(IWaveform other) {
return (other instanceof TxStream && this.getId().equals(other.getId()));
return (other instanceof TxStream && this.getId() == other.getId());
}
/**