Package xbird.util.struct

Examples of xbird.util.struct.Pair


    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:numeric-mod(xs:integer, xs:integer) as xs:integer
                new Pair(new AtomicType[] { IntegerType.INTEGER, IntegerType.INTEGER }, IntegerType.INTEGER),
                // op:numeric-mod(xs:decimal, xs:decimal) as xs:decimal
                new Pair(new AtomicType[] { DecimalType.DECIMAL, DecimalType.DECIMAL }, DecimalType.DECIMAL),
                // op:numeric-mod(xs:float, xs:float) as xs:float
                new Pair(new AtomicType[] { FloatType.FLOAT, FloatType.FLOAT }, FloatType.FLOAT),
                // workaround
                new Pair(new AtomicType[] { DecimalType.DECIMAL, FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { FloatType.FLOAT, DecimalType.DECIMAL }, FloatType.FLOAT),
                // op:numeric-mod(xs:double, xs:double) as xs:double
                new Pair(new AtomicType[] { DoubleType.DOUBLE, DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // workaround
                new Pair(new AtomicType[] { NumericType.getInstance(), NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here


    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:numeric-add(xs:integer, xs:integer) as xs:integer
                new Pair(new AtomicType[] { IntegerType.INTEGER, IntegerType.INTEGER }, IntegerType.INTEGER),
                // op:numeric-add(xs:decimal, xs:decimal) as xs:decimal
                new Pair(new AtomicType[] { DecimalType.DECIMAL, DecimalType.DECIMAL }, DecimalType.DECIMAL),
                // op:numeric-add(xs:float, xs:float) as xs:float
                new Pair(new AtomicType[] { FloatType.FLOAT, FloatType.FLOAT }, FloatType.FLOAT),
                // workaround
                new Pair(new AtomicType[] { DecimalType.DECIMAL, FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { FloatType.FLOAT, DecimalType.DECIMAL }, FloatType.FLOAT),
                // op:numeric-add(xs:double, xs:double) as xs:double
                new Pair(new AtomicType[] { DoubleType.DOUBLE, DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // op:add-yearMonthDuration-to-date(xs:date, xdt:yearMonthDuration) as xs:date
                new Pair(new AtomicType[] { DateType.DATE, YearMonthDurationType.YEARMONTH_DURATION }, DateType.DATE),
                // op:add-yearMonthDuration-to-date(xdt:yearMonthDuration, xs:date) as xs:date
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION, DateType.DATE }, DateType.DATE),
                // op:add-dayTimeDuration-to-date(xs:date, xdt:dayTimeDuration) as xs:date
                new Pair(new AtomicType[] { DateType.DATE, DayTimeDurationType.DAYTIME_DURATION }, DateType.DATE),
                // op:add-dayTimeDuration-to-date(xdt:dayTimeDuration, xs:date) as xs:date
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION, DateType.DATE }, DateType.DATE),
                // op:add-dayTimeDuration-to-time(xs:time, xdt:dayTimeDuration) as xs:time
                new Pair(new AtomicType[] { TimeType.TIME, DayTimeDurationType.DAYTIME_DURATION }, TimeType.TIME),
                // op:add-dayTimeDuration-to-time(xdt:dayTimeDuration, xs:time) as xs:time
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION, TimeType.TIME }, TimeType.TIME),
                // op:add-yearMonthDuration-to-dateTime(xs:dateTime, xdt:yearMonthDuration) as xs:dateTime
                new Pair(new AtomicType[] { DateTimeType.DATETIME,
                        YearMonthDurationType.YEARMONTH_DURATION }, DateTimeType.DATETIME),
                // op:add-yearMonthDuration-to-dateTime(xdt:yearMonthDuration, xs:dateTime) as xs:dateTime
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        DateTimeType.DATETIME }, DateTimeType.DATETIME),
                // op:add-dayTimeDuration-to-dateTime(xs:dateTime, xdt:dayTimeDuration) as xs:dateTime
                new Pair(new AtomicType[] { DateTimeType.DATETIME,
                        DayTimeDurationType.DAYTIME_DURATION }, DateTimeType.DATETIME),
                // op:add-dayTimeDuration-to-dateTime(xdt:dayTimeDuration, xs:dateTime) as xs:dateTime
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        DateTimeType.DATETIME }, DateTimeType.DATETIME),
                // op:add-yearMonthDurations(xdt:yearMonthDuration, xdt:yearMonthDuration) as xdt:yearMonthDuration
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        YearMonthDurationType.YEARMONTH_DURATION }, YearMonthDurationType.YEARMONTH_DURATION),
                // op:add-dayTimeDurations(xdt:dayTimeDuration, xdt:dayTimeDuration) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        DayTimeDurationType.DAYTIME_DURATION }, DayTimeDurationType.DAYTIME_DURATION),
                // workaround
                new Pair(new AtomicType[] { NumericType.getInstance(), NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:numeric-subtract(xs:integer, xs:integer) as xs:integer
                new Pair(new AtomicType[] { IntegerType.INTEGER, IntegerType.INTEGER }, IntegerType.INTEGER),
                // op:numeric-subtract(xs:decimal, xs:decimal) as xs:decimal
                new Pair(new AtomicType[] { DecimalType.DECIMAL, DecimalType.DECIMAL }, DecimalType.DECIMAL),
                // op:numeric-subtract(xs:float, xs:float) as xs:float
                new Pair(new AtomicType[] { FloatType.FLOAT, FloatType.FLOAT }, FloatType.FLOAT),
                // workaround
                new Pair(new AtomicType[] { DecimalType.DECIMAL, FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { FloatType.FLOAT, DecimalType.DECIMAL }, FloatType.FLOAT),
                // op:numeric-subtract(xs:double, xs:double) as xs:double
                new Pair(new AtomicType[] { DoubleType.DOUBLE, DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // fn:subtract-dates(xs:date, xs:date) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DateType.DATE, DateType.DATE }, DayTimeDurationType.DAYTIME_DURATION),
                // op:subtract-yearMonthDuration-from-date(xs:date, xdt:yearMonthDuration) as xs:date
                new Pair(new AtomicType[] { DateType.DATE, YearMonthDurationType.YEARMONTH_DURATION }, DateType.DATE),
                // op:subtract-dayTimeDuration-from-date(xs:date, xdt:dayTimeDuration) as xs:date
                new Pair(new AtomicType[] { DateType.DATE, DayTimeDurationType.DAYTIME_DURATION }, DateType.DATE),
                // fn:subtract-times(xs:time, xs:time) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { TimeType.TIME, TimeType.TIME }, DayTimeDurationType.DAYTIME_DURATION),
                // op:subtract-dayTimeDuration-from-time(xs:time, xdt:dayTimeDuration) as xs:time
                new Pair(new AtomicType[] { TimeType.TIME, DayTimeDurationType.DAYTIME_DURATION }, TimeType.TIME),
                // fn:get-dayTimeDuration-from-dateTimes(xs:dateTime, xs:dateTime) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DateTimeType.DATETIME, DateTimeType.DATETIME }, DayTimeDurationType.DAYTIME_DURATION),
                // op:subtract-yearMonthDuration-from-dateTime(xs:dateTime, xdt:yearMonthDuration) as xs:dateTime
                new Pair(new AtomicType[] { DateTimeType.DATETIME,
                        YearMonthDurationType.YEARMONTH_DURATION }, DateTimeType.DATETIME),
                // op:subtract-dayTimeDuration-from-dateTime(xs:dateTime, xdt:dayTimeDuration) as xs:dateTime
                new Pair(new AtomicType[] { DateTimeType.DATETIME,
                        DayTimeDurationType.DAYTIME_DURATION }, DateTimeType.DATETIME),
                // op:subtract-yearMonthDurations(xdt:yearMonthDuration, xdt:yearMonthDuration) as xdt:yearMonthDuration
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        YearMonthDurationType.YEARMONTH_DURATION }, YearMonthDurationType.YEARMONTH_DURATION),
                // op:subtract-dayTimeDurations(xdt:dayTimeDuration, xdt:dayTimeDuration) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        DayTimeDurationType.DAYTIME_DURATION }, DayTimeDurationType.DAYTIME_DURATION),
                // workaround
                new Pair(new AtomicType[] { NumericType.getInstance(), NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                new Pair(new AtomicType[] { IntegerType.INTEGER }, IntegerType.INTEGER),
                new Pair(new AtomicType[] { DecimalType.DECIMAL }, DecimalType.DECIMAL),
                new Pair(new AtomicType[] { FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // workaround
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:integer-div(numeric, numeric) as xs:integer
                new Pair(new AtomicType[] { NumericType.Singleton.INSTANCE,
                        NumericType.Singleton.INSTANCE }, IntegerType.INTEGER),
                // WORKAROUND
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, IntegerType.INTEGER),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, IntegerType.INTEGER),
                // REVIEWME
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, IntegerType.INTEGER) };
        return s;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected final Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:numeric-multiply(xs:integer, xs:integer) as xs:integer
                new Pair(new AtomicType[] { IntegerType.INTEGER, IntegerType.INTEGER }, IntegerType.INTEGER),
                // op:numeric-multiply(xs:decimal, xs:decimal) as xs:decimal
                new Pair(new AtomicType[] { DecimalType.DECIMAL, DecimalType.DECIMAL }, DecimalType.DECIMAL),
                // op:numeric-multiply(xs:float, xs:float) as xs:float
                new Pair(new AtomicType[] { FloatType.FLOAT, FloatType.FLOAT }, FloatType.FLOAT),
                // workaround
                new Pair(new AtomicType[] { DecimalType.DECIMAL, FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { FloatType.FLOAT, DecimalType.DECIMAL }, FloatType.FLOAT),
                // op:numeric-multiply(xs:double, xs:double) as xs:double
                new Pair(new AtomicType[] { DoubleType.DOUBLE, DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // op:multiply-yearMonthDuration(xdt:yearMonthDuration, xs:double) as xdt:yearMonthDuration
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        NumericType.getInstance() }, YearMonthDurationType.YEARMONTH_DURATION),
                // op:multiply-yearMonthDuration(xs:double, xdt:yearMonthDuration) as xdt:yearMonthDuration
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        YearMonthDurationType.YEARMONTH_DURATION }, YearMonthDurationType.YEARMONTH_DURATION),
                // op:multiply-dayTimeDuration(xdt:dayTimeDuration, xs:double) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        NumericType.getInstance() }, DayTimeDurationType.DAYTIME_DURATION),
                // op:multiply-dayTimeDuration(xs:double, xdt:dayTimeDuration) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        DayTimeDurationType.DAYTIME_DURATION }, DayTimeDurationType.DAYTIME_DURATION),
                // workaround
                new Pair(new AtomicType[] { NumericType.getInstance(), NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here

    @SuppressWarnings("unchecked")
    protected Pair<AtomicType[], AtomicType>[] signatures() {
        final Pair<AtomicType[], AtomicType>[] s = new Pair[] {
                // op:numeric-divide(xs:integer, xs:integer) as xs:double
                // As a special case, if the types of both $arg1 and $arg2 are xs:integer, then the return type is xs:decimal.
                new Pair(new AtomicType[] { IntegerType.INTEGER, IntegerType.INTEGER }, DecimalType.DECIMAL),
                // op:numeric-divide(xs:decimal, xs:decimal) as xs:decimal
                new Pair(new AtomicType[] { DecimalType.DECIMAL, DecimalType.DECIMAL }, DecimalType.DECIMAL),
                // op:numeric-divide(xs:float, xs:float) as xs:float
                new Pair(new AtomicType[] { FloatType.FLOAT, FloatType.FLOAT }, FloatType.FLOAT),
                // workaround
                new Pair(new AtomicType[] { DecimalType.DECIMAL, FloatType.FLOAT }, FloatType.FLOAT),
                new Pair(new AtomicType[] { FloatType.FLOAT, DecimalType.DECIMAL }, FloatType.FLOAT),
                // op:numeric-divide(xs:double, xs:double) as xs:double
                new Pair(new AtomicType[] { DoubleType.DOUBLE, DoubleType.DOUBLE }, DoubleType.DOUBLE),
                // op:divide-yearMonthDuration(xdt:yearMonthDuration, xs:double) as xdt:yearMonthDuration
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        NumericType.getInstance() }, YearMonthDurationType.YEARMONTH_DURATION),
                // op:divide-dayTimeDuration(xdt:dayTimeDuration, xs:double) as xdt:dayTimeDuration
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        NumericType.getInstance() }, DayTimeDurationType.DAYTIME_DURATION),
                // op:divide-yearMonthDuration-by-yearMonthDuration(xdt:yearMonthDuration, xdt:yearMonthDuration) as xs:decimal
                new Pair(new AtomicType[] { YearMonthDurationType.YEARMONTH_DURATION,
                        YearMonthDurationType.YEARMONTH_DURATION }, DecimalType.DECIMAL),
                // op:divide-dayTimeDuration-by-dayTimeDuration(xdt:dayTimeDuration, xdt:dayTimeDuration) as xs:decimal
                new Pair(new AtomicType[] { DayTimeDurationType.DAYTIME_DURATION,
                        DayTimeDurationType.DAYTIME_DURATION }, DecimalType.DECIMAL),
                // workaround
                new Pair(new AtomicType[] { NumericType.getInstance(), NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        NumericType.getInstance() }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { NumericType.getInstance(),
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE),
                new Pair(new AtomicType[] { UntypedAtomicType.UNTYPED_ATOMIC,
                        UntypedAtomicType.UNTYPED_ATOMIC }, DoubleType.DOUBLE) };
        return s;
    }
View Full Code Here

TOP

Related Classes of xbird.util.struct.Pair

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.