Package loci.formats

Class NumberFilter

java.lang.Object
loci.formats.NumberFilter
All Implemented Interfaces:
FileFilter

public class NumberFilter extends Object implements FileFilter
NumberFilter is a helper filter for FilePattern.findPattern().
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private String
    String appearing after the numerical block.
    private String
    String appearing before the numerical block.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a filter for files containing a numerical block, sandwiched between the given strings.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(File pathname)
    Tests if a specified file should be included in a file list.
    boolean
    accept(String name)
    Tests if a specified file should be included in a file list.
    Gets numbers filling the asterisk positions.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • pre

      private String pre
      String appearing before the numerical block.
    • post

      private String post
      String appearing after the numerical block.
  • Constructor Details

    • NumberFilter

      public NumberFilter(String pre, String post)
      Creates a filter for files containing a numerical block, sandwiched between the given strings.
  • Method Details

    • getNumber

      public BigInteger getNumber(String name)
      Gets numbers filling the asterisk positions.
    • accept

      public boolean accept(String name)
      Tests if a specified file should be included in a file list.
    • accept

      public boolean accept(File pathname)
      Tests if a specified file should be included in a file list.
      Specified by:
      accept in interface FileFilter