gr.uoa.di.madgik.searchlibrary.operatorlibrary.select
Class Binder
java.lang.Object
gr.uoa.di.madgik.searchlibrary.operatorlibrary.select.Binder
public class Binder
- extends Object
Given some bindings as an input, replaces all references within a logical
expression string that match a particular pattern.
- Author:
- john.gerbesiotis - DI NKUA
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Binder
public Binder(String expr)
- Constructor
- Parameters:
expr - The expression to be evaluated.
Binder
public Binder(String expr,
String pattern)
- Constructor
- Parameters:
expr - The expression to be evaluated.pattern - The pattern to be matched (e.g. [(\d+)])
getSubstitutions
public Set<String> getSubstitutions()
- Returns:
- A set of references that must be substituted.
substitute
public String substitute(Map<String,String> bindings)
- Parameters:
bindings - The bindings between the references and the actual values that will take their place.
- Returns:
- The string after substitutions.
main
public static void main(String[] args)
throws IOException
- Throws:
IOException
Copyright © 2013. All Rights Reserved.