Interface IPath<T>

Type Parameters:
T - コンテキスト型(TreePath=JsonNode, TreePath=List<String>, CSVPath=Integer)
All Known Implementing Classes:
AbstractPath, CSVPath, TreePath
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface IPath<T>
最小限のPathインターフェース

このインターフェースは、StreamConverterで使用される様々な種類のパスセレクタ (TreePath、TreePath、CSVパス)の統一的な契約を提供します。

Don't Ask, Tell原則に従い、パス一致判定のみに特化した設計です。

このインターフェースは関数型インターフェースです。ラムダ式やメソッド参照で実装できます。

使用例:


 IPath<JsonNode> rootPath = node -> node.isRoot();
 IPath<Integer> evenColumnPath = col -> col % 2 == 0;
 
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    matches(T context)
    指定されたコンテキストがこのパスにマッチするか判定
  • Method Details

    • matches

      boolean matches(T context)
      指定されたコンテキストがこのパスにマッチするか判定
      Parameters:
      context - 判定対象のコンテキスト
      Returns:
      マッチする場合true