com.wewebu.expression.language
Class OwExprBinaryConversionTable

java.lang.Object
  extended by com.wewebu.expression.language.OwExprBinaryConversionTable

public class OwExprBinaryConversionTable
extends Object

Binary conversion tables are bidimensional-array like structures holding information on how a binary operator should perform type conversions.
Column and row type indexes can be matched against left and right operands type indexes and the resulted conversion type is the element found at the matched indexes in the table.

Alfresco Workdesk
Copyright (c) Alfresco Software, Inc.
All rights reserved.

For licensing information read the license.txt file or
go to: http://wiki.alfresco.com


Constructor Summary
OwExprBinaryConversionTable()
          Constructor.
 
Method Summary
 void add(OwExprType[] types1_p, OwExprType type2_p, OwExprType conversion_p)
          Adds a conversion rule
 void add(OwExprType type1_p, OwExprType[] types2_p, OwExprType conversion_p)
          Adds a conversion rule
 void add(OwExprType type1_p, OwExprType type2_p, OwExprType conversion_p)
          Adds a conversion rule
 OwExprType convert(OwExprType type1_p, OwExprType type2_p)
           
 Set getConversionsType1(OwExprType type_p)
           
 Set getConversionsType1(Set types_p)
           
 Set getConversionsType2(OwExprType type_p)
           
 Set getConversionsType2(Set types_p)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OwExprBinaryConversionTable

public OwExprBinaryConversionTable()
Constructor. The m_conversionTable internal table is filled with OwExprType.NOTYPE

Method Detail

getConversionsType1

public Set getConversionsType1(Set types_p)
Parameters:
types_p -
Returns:
all types of the left side operand that might result in the desiganted types_p type set if conversion rules defined by this table are applyed

getConversionsType2

public Set getConversionsType2(Set types_p)
Parameters:
types_p -
Returns:
all types of the right side operand that might result in the desiganted types_p type set if conversion rules defined by this table are applyed

getConversionsType1

public Set getConversionsType1(OwExprType type_p)
Parameters:
type_p -
Returns:
all types of the left side operand that might result in the desiganted type_p type if conversion rules defined by this table are applyed

getConversionsType2

public Set getConversionsType2(OwExprType type_p)
Parameters:
type_p -
Returns:
all types of the right side operand that might result in the desiganted type_p type if conversion rules defined by this table are applyed

add

public final void add(OwExprType type1_p,
                      OwExprType[] types2_p,
                      OwExprType conversion_p)
Adds a conversion rule

Parameters:
type1_p - left side operand type
types2_p - right side operand types
conversion_p - resulted type
Throws:
RuntimeException - if a conversion rule for the specified operands was already added
IllegalArgumentException - if the converted type is OwExprType.NOTYPE

add

public final void add(OwExprType[] types1_p,
                      OwExprType type2_p,
                      OwExprType conversion_p)
Adds a conversion rule

Parameters:
types1_p - left side operand types
type2_p - right side operand type
conversion_p - resulted type
Throws:
RuntimeException - if a conversion rule for the specified operands was already added
IllegalArgumentException - if the converted type is OwExprType.NOTYPE

add

public final void add(OwExprType type1_p,
                      OwExprType type2_p,
                      OwExprType conversion_p)
Adds a conversion rule

Parameters:
type1_p - left side operand types
type2_p - right side operand type
conversion_p - resulted type
Throws:
RuntimeException - if a conversion rule for the specified operands was already added
IllegalArgumentException - if the converted type is OwExprType.NOTYPE

convert

public final OwExprType convert(OwExprType type1_p,
                                OwExprType type2_p)
Parameters:
type1_p -
type2_p -
Returns:
the type that results from applying the current conversion table rules to the specified operand types


Copyright © 2013 Alfresco Business Solutions. All Rights Reserved.