• Intro Headers Instructions Macros Commands
Fork me on GitHub
    • Getting Started
      • Introduction
      • How to install bnd
      • Guided Tour Workspace & Projects
      • bnd / bndlib Features and JAR Wrapping Techniques
      • FAQ - Frequently Asked Questions
    • Concepts and Practices
      • Concepts
      • Background
      • Best practices
    • Build and Development
      • Build
      • Generating JARs
      • Versioning
      • Baselining
      • Service Components
      • Metatype
      • Contracts
      • Bundle Annotations
      • Accessor Properties
      • SPI Annotations
    • Dependency and Launching
      • Resolving Dependencies
      • Launching
      • Startlevels
    • Testing
      • Testing
      • Testing with Launchpad
    • Packaging and Distribution
      • Packaging Applications
      • JPMS Libraries
      • Wrapping Libraries to OSGi Bundles
    • Documentation and Tools
      • Generating Documentation
      • bnd CLI Commands
      • For Developers
      • Templates for Workspaces
      • Tips for Windows users
      • Tools bound to bnd
    • Reference Material
      • Reference
      • Headers
      • Instruction Reference
      • Instruction Index
      • Macro Reference
      • Macro Index
      • Plugins
      • External Plugins
    • Configuration and Troubleshooting
      • Settings
      • Errors
      • Warnings
  • min (';' LIST )*

    Prev Next
    Macro
    Find the minimum string in one or more lists

    Summary

    The min macro compares strings lexicographically using Java’s String.compareTo() and returns the minimum (lowest) value.

    Syntax

    ${min;<list>[;<list>...]}
    

    Parameters

    • list - One or more semicolon-separated lists of strings

    Behavior

    • Compares strings lexicographically
    • Case-sensitive comparison
    • Returns the lowest string value
    • Uses standard Java string ordering

    Examples

    Find minimum string:

    ${min;apple,banana,cherry}
    # Returns: "apple"
    

    Multiple lists:

    ${min;xyz,abc;mno,def}
    # Returns: "abc"
    

    Numeric strings (lexicographic):

    ${min;1,10,2,20}
    # Returns: "1" (lexicographic, not numeric)
    

    Use Cases

    • Finding lowest string value
    • String comparison
    • Alphabetic sorting (first)
    • String selection
    • Data analysis

    Notes

    • Lexicographic (dictionary) ordering
    • Case-sensitive (“A” < “a”)
    • Not numeric comparison
    • For numeric min, use proper number comparison
    • See also: ${max} for maximum
    • See also: ${vmin} for version comparison
    • See also: ${nmin} for numeric comparison

    See test cases in MacroTestsForDocsExamples.java

Prev Next
Search
    • Home