dev.fuxing.airtable.formula.AirtableFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of airtable-api Show documentation
Show all versions of airtable-api Show documentation
Java Airtable API for https://airtable.com/api
The newest version!
package dev.fuxing.airtable.formula;
import java.util.StringJoiner;
/**
* Airtable function interface.
*
* Created by: Fuxing
* Date: 2019-04-21
* Time: 02:04
*/
public interface AirtableFunction {
/**
* @param objects in the function
* @return String formula
*/
String apply(AirtableFormula.Object... objects);
/**
* @param name of the function
* @param objects values to join inside
* @return left + ' operator ' + [right + ' operator ', ...objects]
*/
default String function(String name, AirtableFormula.Object... objects) {
StringJoiner joiner = new StringJoiner(",", name + "(", ")");
for (Object other : objects) {
joiner.add(other.toString());
}
return joiner.toString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy