loci.formats

## Class NumberFilter

- java.lang.Object
- - loci.formats.NumberFilter

- All Implemented Interfaces:
    java.io.FileFilter

      public class NumberFilter
      extends java.lang.Object
      implements java.io.FileFilter

  NumberFilter is a helper filter for FilePattern.findPattern().

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `post` String appearing after the numerical block.
    `private java.lang.String` | `pre` String appearing before the numerical block.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `NumberFilter(java.lang.String pre, java.lang.String post)` Creates a filter for files containing a numerical block, sandwiched between the given strings.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `accept(java.io.File pathname)` Tests if a specified file should be included in a file list.
    `boolean` | `accept(java.lang.String name)` Tests if a specified file should be included in a file list.
    `java.math.BigInteger` | `getNumber(java.lang.String name)` 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 Detail

    - #### pre

          private java.lang.String pre

      String appearing before the numerical block.

    - #### post

          private java.lang.String post

      String appearing after the numerical block.

  - ### Constructor Detail

    - #### NumberFilter

          public NumberFilter(java.lang.String pre,
                              java.lang.String post)

      Creates a filter for files containing a numerical block, sandwiched between the given strings.

  - ### Method Detail

    - #### getNumber

          public java.math.BigInteger getNumber(java.lang.String name)

      Gets numbers filling the asterisk positions.

    - #### accept

          public boolean accept(java.lang.String name)

      Tests if a specified file should be included in a file list.

    - #### accept

          public boolean accept(java.io.File pathname)

      Tests if a specified file should be included in a file list.
      Specified by:
        `accept` in interface `java.io.FileFilter`

Copyright © 2026 Open Microscopy Environment