Skip to content

Adopted Google Java Style #295

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added

### Changed
* Reformatted all sourcecode to [Google Java Style](https://google.github.io/styleguide/javaguide.html)

### Deprecated

Expand All @@ -22,8 +23,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### CI/CD
* Configured the [refactor-first-maven-plugin](https://github.com/jimbethancourt/RefactorFirst) within a profile in the pom.xml.
* Configured [Spotify's fmt-maven-plugin](https://github.com/spotify/fmt-maven-plugin) to format to Google Java Style during builds.

### Other
* Adopted [Google Java Style](https://google.github.io/styleguide/javaguide.html)


## [4.3.0] - 2022-10-17
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ API documentation: https://jpt.cicirello.org/api
| __JaCoCo Test Coverage__ | [![coverage](https://raw.githubusercontent.com/cicirello/JavaPermutationTools/badges/jacoco.svg)](https://github.com/cicirello/JavaPermutationTools/actions/workflows/build.yml) [![branch coverage](https://raw.githubusercontent.com/cicirello/JavaPermutationTools/badges/branches.svg)](https://github.com/cicirello/JavaPermutationTools/actions/workflows/build.yml) |
| __Security__ | [![Snyk security score](https://snyk-widget.herokuapp.com/badge/mvn/org.cicirello/jpt/badge.svg)](https://snyk.io/vuln/maven%3Aorg.cicirello%3Ajpt) [![Snyk Known Vulnerabilities](https://snyk.io/test/github/cicirello/JavaPermutationTools/badge.svg)](https://snyk.io/test/github/cicirello/JavaPermutationTools) |
| __DOI__ | [![DOI](https://zenodo.org/badge/139182095.svg)](https://zenodo.org/badge/latestdoi/139182095) |
| __License__ | [![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE) |
| __Other Information__ | [![GitHub](https://img.shields.io/github/license/cicirello/JavaPermutationTools)](https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE) [![style](https://img.shields.io/badge/style-Google%20Java%20Style-informational)](https://google.github.io/styleguide/javaguide.html) |
| __Support__ | [![GitHub Sponsors](https://img.shields.io/badge/sponsor-30363D?logo=GitHub-Sponsors&logoColor=#EA4AAA)](https://github.com/sponsors/cicirello) [![Liberapay](https://img.shields.io/badge/Liberapay-F6C915?logo=liberapay&logoColor=black)](https://liberapay.com/cicirello) [![Ko-Fi](https://img.shields.io/badge/Ko--fi-F16061?logo=ko-fi&logoColor=white)](https://ko-fi.com/cicirello) |

## How to Cite
Expand Down
12 changes: 12 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,18 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>com.spotify.fmt</groupId>
<artifactId>fmt-maven-plugin</artifactId>
<version>2.19</version>
<executions>
<execution>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
150 changes: 79 additions & 71 deletions src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@
* JavaPermutationTools - A Java library for computation on permutations.
* Copyright 2005-2022 Vincent A. Cicirello, <https://www.cicirello.org/>.
*
* JavaPermutationTools is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your
* JavaPermutationTools is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* JavaPermutationTools is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more
* JavaPermutationTools is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
Expand All @@ -20,82 +20,90 @@
*/

/**
*
*
* <h2>JavaPermutationTools - A Java library for computation on permutations</h2>
*
* <p>Copyright &copy; 2005-2022 <a href="https://www.cicirello.org/" target=_top>Vincent A. Cicirello</a>.</p>
*
* <p><a href="https://doi.org/10.21105/joss.00950"><img
* src="http://joss.theoj.org/papers/10.21105/joss.00950/status.svg"
* alt="DOI:10.21105/joss.00950" height="20" width="168"></a>
* <a href="https://search.maven.org/artifact/org.cicirello/jpt"><img
* src="https://img.shields.io/maven-central/v/org.cicirello/jpt.svg?logo=apachemaven"
* alt="Maven Central" height="20" width="153"></a>
* <a href="https://github.com/cicirello/JavaPermutationTools/releases"><img
* src="https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub"
* alt="GitHub release (latest by date)" height="20" width="111"></a>
* <a href="https://github.com/cicirello/JavaPermutationTools"><img
* src="https://jpt.cicirello.org/images/GitHub.svg"
* alt="GitHub Repository" width="68" height="20"></a>
* <a href="https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE"><img
* src="https://img.shields.io/github/license/cicirello/JavaPermutationTools"
* alt="GNU General Public License Version 3 (GPLv3)" height="20" width="102"></a>
* </p>
* <p>Copyright &copy; 2005-2022 <a href="https://www.cicirello.org/" target=_top>Vincent A.
* Cicirello</a>.
*
* <p><a href="https://doi.org/10.21105/joss.00950"><img
* src="http://joss.theoj.org/papers/10.21105/joss.00950/status.svg" alt="DOI:10.21105/joss.00950"
* height="20" width="168"></a> <a href="https://search.maven.org/artifact/org.cicirello/jpt"><img
* src="https://img.shields.io/maven-central/v/org.cicirello/jpt.svg?logo=apachemaven" alt="Maven
* Central" height="20" width="153"></a> <a
* href="https://github.com/cicirello/JavaPermutationTools/releases"><img
* src="https://img.shields.io/github/v/release/cicirello/JavaPermutationTools?logo=GitHub"
* alt="GitHub release (latest by date)" height="20" width="111"></a> <a
* href="https://github.com/cicirello/JavaPermutationTools"><img
* src="https://jpt.cicirello.org/images/GitHub.svg" alt="GitHub Repository" width="68"
* height="20"></a> <a
* href="https://github.com/cicirello/JavaPermutationTools/blob/master/LICENSE"><img
* src="https://img.shields.io/github/license/cicirello/JavaPermutationTools" alt="GNU General
* Public License Version 3 (GPLv3)" height="20" width="102"></a>
*
* <h3>About the JavaPermutationTools Library</h3>
*
* <p>JavaPermutationTools (JPT) is a Java library for representing and generating permutations
* and sequences, as well as performing computation on permutations and sequences. This includes
* implementations of a variety of permutation distance metrics as well as distance metrics on
* sequences (i.e., Strings, arrays, and other ordered data types).</p>
*
* <p>The <a href="https://github.com/cicirello/JavaPermutationTools" target=_top>source code</a>
* is hosted on GitHub; and is licensed under the
* <a href="https://www.gnu.org/licenses/gpl-3.0.html" target=_top>GNU General Public License
* Version 3 (GPLv3)</a>. The library's jar files are regularly published
* to <a href="https://search.maven.org/artifact/org.cicirello/jpt" target=_top>Maven Central</a>,
* from which it is easily imported into software projects using Maven and other
* commonly used build tools. Additionally, there is a
* GitHub <a href="https://github.com/cicirello/jpt-examples" target=_top>repository of
* example programs</a> that show basic usage of the JPT library, as well as replication programs that
* reproduce results found in published papers.</p>
*
* <p>For more information see the <a href="https://jpt.cicirello.org/" target=_top>JavaPermutationTools
* website</a>. Potential contributors, please see the source repository, and/or
* contact <a href="https://www.cicirello.org/" target=_top>Vincent A. Cicirello</a>.</p>
*
* <p>JavaPermutationTools (JPT) is a Java library for representing and generating permutations and
* sequences, as well as performing computation on permutations and sequences. This includes
* implementations of a variety of permutation distance metrics as well as distance metrics on
* sequences (i.e., Strings, arrays, and other ordered data types).
*
* <p>The <a href="https://github.com/cicirello/JavaPermutationTools" target=_top>source code</a> is
* hosted on GitHub; and is licensed under the <a href="https://www.gnu.org/licenses/gpl-3.0.html"
* target=_top>GNU General Public License Version 3 (GPLv3)</a>. The library's jar files are
* regularly published to <a href="https://search.maven.org/artifact/org.cicirello/jpt"
* target=_top>Maven Central</a>, from which it is easily imported into software projects using
* Maven and other commonly used build tools. Additionally, there is a GitHub <a
* href="https://github.com/cicirello/jpt-examples" target=_top>repository of example programs</a>
* that show basic usage of the JPT library, as well as replication programs that reproduce results
* found in published papers.
*
* <p>For more information see the <a href="https://jpt.cicirello.org/"
* target=_top>JavaPermutationTools website</a>. Potential contributors, please see the source
* repository, and/or contact <a href="https://www.cicirello.org/" target=_top>Vincent A.
* Cicirello</a>.
*
* <h3>How to Cite</h3>
*
* <p>If you use the JPT library in your research, please cite the following
* article which describes the library:</p>
* <p>If you use the JPT library in your research, please cite the following article which describes
* the library:
*
* <ul>
* <li>Vincent A. Cicirello.
* <a href="https://www.cicirello.org/publications/cicirello2018joss.html">JavaPermutationTools: A Java Library of Permutation Distance Metrics</a>.
* <i>Journal of Open Source Software</i>, 3(31), 950, November 2018.
* <a href="https://www.cicirello.org/publications/cicirello2018joss.pdf">[PDF]</a> <a href="https://www.cicirello.org/publications/cicirello2018joss.bib">[BIB]</a> <a href="https://doi.org/10.21105/joss.00950">[DOI]</a></li>
* <li>Vincent A. Cicirello. <a
* href="https://www.cicirello.org/publications/cicirello2018joss.html">JavaPermutationTools:
* A Java Library of Permutation Distance Metrics</a>. <i>Journal of Open Source Software</i>,
* 3(31), 950, November 2018. <a
* href="https://www.cicirello.org/publications/cicirello2018joss.pdf">[PDF]</a> <a
* href="https://www.cicirello.org/publications/cicirello2018joss.bib">[BIB]</a> <a
* href="https://doi.org/10.21105/joss.00950">[DOI]</a>
* </ul>
*
* <h3>Support JavaPermutationTools</h3>
*
* <p><a href="https://github.com/sponsors/cicirello"><img src="https://jpt.cicirello.org/images/github-sponsors.svg" alt="GitHub Sponsors" width="107" height="28"></a>
* <a href="https://liberapay.com/cicirello"><img src="https://jpt.cicirello.org/images/Liberapay.svg" alt="Liberapay" width="119" height="28"></a>
* <a href="https://ko-fi.com/cicirello"><img src="https://jpt.cicirello.org/images/ko-fi.svg" alt="Ko-Fi" width="82" height="28"></a></p>
* <p><a href="https://github.com/sponsors/cicirello"><img
* src="https://jpt.cicirello.org/images/github-sponsors.svg" alt="GitHub Sponsors" width="107"
* height="28"></a> <a href="https://liberapay.com/cicirello"><img
* src="https://jpt.cicirello.org/images/Liberapay.svg" alt="Liberapay" width="119" height="28"></a>
* <a href="https://ko-fi.com/cicirello"><img src="https://jpt.cicirello.org/images/ko-fi.svg"
* alt="Ko-Fi" width="82" height="28"></a>
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a
* href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
module org.cicirello.jpt {
exports org.cicirello.permutations;
exports org.cicirello.permutations.distance;
exports org.cicirello.sequences;
exports org.cicirello.sequences.distance;
// Specified transitive on these to minimize the impact
// of the introduction of modules on users' existing code
// that might assume access to the classes/interfaces from these
// modules. Strictly speaking, these do not need to be transitive
// for jpt because jpt's public interface does not depend on anything
// in these (e.g., no objects of any classes from these modules are
// returned or expected as parameters).
requires transitive org.cicirello.rho_mu;
requires transitive org.cicirello.core;
exports org.cicirello.permutations;
exports org.cicirello.permutations.distance;
exports org.cicirello.sequences;
exports org.cicirello.sequences.distance;

// Specified transitive on these to minimize the impact
// of the introduction of modules on users' existing code
// that might assume access to the classes/interfaces from these
// modules. Strictly speaking, these do not need to be transitive
// for jpt because jpt's public interface does not depend on anything
// in these (e.g., no objects of any classes from these modules are
// returned or expected as parameters).
requires transitive org.cicirello.rho_mu;
requires transitive org.cicirello.core;
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
*
* This file is part of JavaPermutationTools (https://jpt.cicirello.org/).
*
* JavaPermutationTools is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your
* JavaPermutationTools is free software: you can
* redistribute it and/or modify it under the terms of the GNU
* General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your
* option) any later version.
*
* JavaPermutationTools is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more
* JavaPermutationTools is distributed in the hope
* that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License
Expand All @@ -23,30 +23,30 @@

/**
* This is a {@link RuntimeException} that is thrown by certain methods of the {@link Permutation}
* class to indicate that the Permutation object's state is invalid, and any subsequent calls
* to methods on that object may be unpredictable.
* class to indicate that the Permutation object's state is invalid, and any subsequent calls to
* methods on that object may be unpredictable.
*
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>,
* <a href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
* @author <a href=https://www.cicirello.org/ target=_top>Vincent A. Cicirello</a>, <a
* href=https://www.cicirello.org/ target=_top>https://www.cicirello.org/</a>
*/
public class IllegalPermutationStateException extends RuntimeException {
/**
* Construct an IllegalPermutationStateException without specifying a cause.
*
* @param message A descriptive message about the exception that is thrown.
*/
public IllegalPermutationStateException(String message) {
super(message);
}
/**
* Construct an IllegalPermutationStateException.
*
* @param message A descriptive message about the exception that is thrown.
* @param cause The cause of the exception.
*/
public IllegalPermutationStateException(String message, Throwable cause) {
super(message, cause);
}

/**
* Construct an IllegalPermutationStateException without specifying a cause.
*
* @param message A descriptive message about the exception that is thrown.
*/
public IllegalPermutationStateException(String message) {
super(message);
}

/**
* Construct an IllegalPermutationStateException.
*
* @param message A descriptive message about the exception that is thrown.
* @param cause The cause of the exception.
*/
public IllegalPermutationStateException(String message, Throwable cause) {
super(message, cause);
}
}
Loading