Skip to content

Commit

Permalink
Remove size() method from PositionLinks
Browse files Browse the repository at this point in the history
  • Loading branch information
pettyjamesm authored and martint committed Nov 4, 2021
1 parent 6c20a1a commit 816596b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ public long checksum()
}

@Override
public int size()
public boolean isEmpty()
{
return size;
return size == 0;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,7 @@ interface FactoryBuilder

Factory build();

/**
* @return number of linked elements
*/
int size();

default boolean isEmpty()
{
return size() == 0;
}
boolean isEmpty();
}

interface Factory
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ public Factory build()
}

@Override
public int size()
public boolean isEmpty()
{
return positionLinks.size();
return positionLinks.isEmpty();
}

// Separate static method to avoid embedding references to "this"
Expand Down

0 comments on commit 816596b

Please sign in to comment.