Skip to content

Commit ca470ab

Browse files
committed
style: rm redundant modifiers
1 parent e1b9cf9 commit ca470ab

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

src/main/java/org/janelia/saalfeldlab/n5/KeyValueAccess.java

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public interface KeyValueAccess {
8181
* the path
8282
* @return the path components
8383
*/
84-
public default String[] components(final String path) {
84+
default String[] components( final String path ) {
8585

8686
String[] components = Arrays.stream(path.split("/"))
8787
.filter(x -> !x.isEmpty())
@@ -109,7 +109,7 @@ public default String[] components(final String path) {
109109
* @param components the path components
110110
* @return the path
111111
*/
112-
public default String compose(final URI uri, final String... components) {
112+
default String compose( final URI uri, final String... components ) {
113113

114114
int firstNonEmptyIdx = 0;
115115
while (firstNonEmptyIdx < components.length && (components[firstNonEmptyIdx] == null || components[firstNonEmptyIdx].isEmpty())) {
@@ -148,7 +148,7 @@ else if (component.endsWith("/") || i == allComponents.length - 1)
148148
}
149149

150150
@Deprecated
151-
public default String compose(final String... components) {
151+
default String compose( final String... components ) {
152152

153153
return normalize(
154154
Arrays.stream(components)
@@ -165,7 +165,7 @@ public default String compose(final String... components) {
165165
* the path
166166
* @return the parent path or null if the path has no parent
167167
*/
168-
public default String parent(final String path) {
168+
default String parent( final String path ) {
169169
final String removeTrailingSlash = path.replaceAll("/+$", "");
170170
return normalize(N5URI.getAsUri(removeTrailingSlash).resolve("").toString());
171171
}
@@ -179,7 +179,7 @@ public default String parent(final String path) {
179179
* the base path
180180
* @return the result or null if the path has no parent
181181
*/
182-
public default String relativize(final String path, final String base) {
182+
default String relativize( final String path, final String base ) {
183183

184184
try {
185185
/*
@@ -205,7 +205,7 @@ public default String relativize(final String path, final String base) {
205205
* the path
206206
* @return the normalized path
207207
*/
208-
public String normalize(final String path);
208+
String normalize( final String path );
209209

210210
/**
211211
* Get the absolute (including scheme) {@link URI} of the given path
@@ -231,7 +231,7 @@ default URI uri(final String uriString) throws URISyntaxException {
231231
* efforts are made to normalize it.
232232
* @return true if the path exists
233233
*/
234-
public boolean exists(final String normalPath);
234+
boolean exists( final String normalPath );
235235

236236
/**
237237
* Returns the size in bytes of the object at the given normalPath if it exists.
@@ -242,7 +242,7 @@ default URI uri(final String uriString) throws URISyntaxException {
242242
* @return the size of the object in bytes.
243243
* @throws N5Exception.N5NoSuchKeyException if the given key does not exist
244244
*/
245-
public long size(final String normalPath) throws N5Exception.N5NoSuchKeyException;
245+
long size( final String normalPath ) throws N5Exception.N5NoSuchKeyException;
246246

247247
/**
248248
* Test whether the path is a directory.
@@ -252,7 +252,7 @@ default URI uri(final String uriString) throws URISyntaxException {
252252
* efforts are made to normalize it.
253253
* @return true if the path is a directory
254254
*/
255-
public boolean isDirectory(String normalPath);
255+
boolean isDirectory( String normalPath );
256256

257257
/**
258258
* Test whether the path is a file.
@@ -262,7 +262,7 @@ default URI uri(final String uriString) throws URISyntaxException {
262262
* efforts are made to normalize it.
263263
* @return true if the path is a file
264264
*/
265-
public boolean isFile(String normalPath); // TODO: Looks un-used. Remove?
265+
boolean isFile( String normalPath ); // TODO: Looks un-used. Remove?
266266

267267
/**
268268
* Create a {@link ReadData} through which data at the normal key can be read.
@@ -276,7 +276,7 @@ default URI uri(final String uriString) throws URISyntaxException {
276276
* @return a materialized Read data
277277
* @throws N5IOException if an error occurs
278278
*/
279-
abstract ReadData createReadData(final String normalPath) throws N5IOException;
279+
ReadData createReadData( final String normalPath ) throws N5IOException;
280280

281281
/**
282282
* Create a lock on a path for reading. This isn't meant to be kept
@@ -294,7 +294,7 @@ default URI uri(final String uriString) throws URISyntaxException {
294294
* @throws N5IOException
295295
* if a locked channel could not be created
296296
*/
297-
public LockedChannel lockForReading(final String normalPath) throws N5IOException;
297+
LockedChannel lockForReading( final String normalPath ) throws N5IOException;
298298

299299
/**
300300
* Create an exclusive lock on a path for writing. If the file doesn't
@@ -314,7 +314,7 @@ default URI uri(final String uriString) throws URISyntaxException {
314314
* @throws N5IOException
315315
* if a locked channel could not be created
316316
*/
317-
public LockedChannel lockForWriting(final String normalPath) throws N5IOException;
317+
LockedChannel lockForWriting( final String normalPath ) throws N5IOException;
318318

319319
/**
320320
* List all 'directory'-like children of a path.
@@ -326,7 +326,7 @@ default URI uri(final String uriString) throws URISyntaxException {
326326
* @throws N5IOException
327327
* if an error occurs during listing
328328
*/
329-
public String[] listDirectories(final String normalPath) throws N5IOException;
329+
String[] listDirectories( final String normalPath ) throws N5IOException;
330330

331331
/**
332332
* List all children of a path.
@@ -337,7 +337,7 @@ default URI uri(final String uriString) throws URISyntaxException {
337337
* @return the the child paths
338338
* @throws N5IOException if an error occurs during listing
339339
*/
340-
public String[] list(final String normalPath) throws N5IOException;
340+
String[] list( final String normalPath ) throws N5IOException;
341341

342342
/**
343343
* Create a directory and all parent paths along the way. The directory
@@ -351,7 +351,7 @@ default URI uri(final String uriString) throws URISyntaxException {
351351
* @throws N5IOException
352352
* if an error occurs during creation
353353
*/
354-
public void createDirectories(final String normalPath) throws N5IOException;
354+
void createDirectories( final String normalPath ) throws N5IOException;
355355

356356
/**
357357
* Delete a path. If the path is a directory, delete it recursively.
@@ -362,7 +362,7 @@ default URI uri(final String uriString) throws URISyntaxException {
362362
* @throws N5IOException
363363
* if an error occurs during deletion
364364
*/
365-
public void delete(final String normalPath) throws N5IOException;
365+
void delete( final String normalPath ) throws N5IOException;
366366

367367
/**
368368
* A lazy reading strategy for lazy, partial reading of data from some source.

0 commit comments

Comments
 (0)