Java Code Examples for org.wso2.balana.attr.DoubleAttribute#identifier()

The following examples show how to use org.wso2.balana.attr.DoubleAttribute#identifier() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MultiplyFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_MULTIPLY))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 2
Source File: AddFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
	if (functionName.equals(NAME_INTEGER_ADD))
		return IntegerAttribute.identifier;
	else
		return DoubleAttribute.identifier;
}
 
Example 3
Source File: AbsFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_ABS))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 4
Source File: NumericConvertFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_DOUBLE_TO_INTEGER))
        return DoubleAttribute.identifier;
    else
        return IntegerAttribute.identifier;
}
 
Example 5
Source File: NumericConvertFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the return type for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getReturnType(String functionName) {
    if (functionName.equals(NAME_DOUBLE_TO_INTEGER))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 6
Source File: DivideFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_DIVIDE))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 7
Source File: SubtractFunction.java    From balana with Apache License 2.0 5 votes vote down vote up
/**
 * Private helper that returns the type used for the given standard function. Note that this
 * doesn't check on the return value since the method always is called after getId, so we assume
 * that the function is present.
 */
private static String getArgumentType(String functionName) {
    if (functionName.equals(NAME_INTEGER_SUBTRACT))
        return IntegerAttribute.identifier;
    else
        return DoubleAttribute.identifier;
}
 
Example 8
Source File: FloorFunction.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new <code>FloorFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public FloorFunction(String functionName) {
    super(NAME_FLOOR, 0, DoubleAttribute.identifier, false, 1, DoubleAttribute.identifier,
            false);

    if (!functionName.equals(NAME_FLOOR))
        throw new IllegalArgumentException("unknown floor function: " + functionName);
}
 
Example 9
Source File: RoundFunction.java    From balana with Apache License 2.0 3 votes vote down vote up
/**
 * Creates a new <code>RoundFunction</code> object.
 * 
 * @param functionName the standard XACML name of the function to be handled by this object,
 *            including the full namespace
 * 
 * @throws IllegalArgumentException if the function is unknown
 */
public RoundFunction(String functionName) {
    super(NAME_ROUND, 0, DoubleAttribute.identifier, false, 1, DoubleAttribute.identifier,
            false);

    if (!functionName.equals(NAME_ROUND))
        throw new IllegalArgumentException("unknown round function: " + functionName);
}