public Object clone() { try { Constructor<? extends ComparativeBaseList> con = this.getClass().getConstructor((Class[]) null); ComparativeBaseList compList = con.newInstance((Object[]) null); for (Comparative com : list) { compList.addComparative((Comparative) com.clone()); } compList.setComparison(this.getComparison()); compList.setValue(this.getValue()); return compList; } catch (Exception e) { e.printStackTrace(); return null; } }
@Override public boolean intersect(Comparative other, Comparator comparator) { if(other instanceof ComparativeBaseList){ ComparativeBaseList target = (ComparativeBaseList)other; return target.intersect(this, comparator); }else{ Comparative left = this.list.get(0); Comparative right = this.list.get(1); return left.intersect(other, comparator) && right.intersect(other, comparator); } }
ComparativeBaseList source = (ComparativeBaseList)col; if((source instanceof ComparativeAND && and) || (source instanceof ComparativeOR && !and)){ source.addComparative(newComparative); }else{ ComparativeBaseList comparativeBaseList = null; comparativeBaseList = new ComparativeOR(col); comparativeBaseList.addComparative(newComparative); columnMap.put(colExpression.getColumn(), comparativeBaseList); comparativeBaseList = new ComparativeOR(col); comparativeBaseList.addComparative(newComparative); columnMap.put(colExpression.getColumn(), comparativeBaseList);
for(Comparative comp:list.getList()){ parameters[index] = comp.getValue(); Comparable<?> value = pfmc.getResult(parameters);
comparativeBaseList = new ComparativeOR(col); comparativeBaseList.addComparative(newComparative); columnMap.put(colExpression.getColumn(), comparativeBaseList); } else {
for(Comparative comp:list.getList()){ parameters[index] = comp.getValue(); Comparable<?> value = pfmc.getResult(parameters);
public Object clone() { try { Constructor<? extends ComparativeBaseList> con = this.getClass().getConstructor((Class[]) null); ComparativeBaseList compList = con.newInstance((Object[]) null); for (Comparative com : list) { compList.addComparative((Comparative) com.clone()); } compList.setComparison(this.getComparison()); compList.setValue(this.getValue()); return compList; } catch (Exception e) { e.printStackTrace(); return null; } } }