Package mondrian.olap.Util

Examples of mondrian.olap.Util.ByteMatcher


            compArray, 0, compArray.length,
            RolapUtil.sqlNullValue);
    }

    public void testByteMatcher() throws Exception {
        final ByteMatcher bm = new ByteMatcher(new byte[] {(byte)0x2A});
        final byte[] bytesNotPresent =
            new byte[] {(byte)0x2B, (byte)0x2C};
        final byte[] bytesPresent =
            new byte[] {(byte)0x2B, (byte)0x2A, (byte)0x2C};
        final byte[] bytesPresentLast =
            new byte[] {(byte)0x2B, (byte)0x2C, (byte)0x2A};
        final byte[] bytesPresentFirst =
                new byte[] {(byte)0x2A, (byte)0x2C, (byte)0x2B};
        assertEquals(-1, bm.match(bytesNotPresent));
        assertEquals(1, bm.match(bytesPresent));
        assertEquals(2, bm.match(bytesPresentLast));
        assertEquals(0, bm.match(bytesPresentFirst));
    }
View Full Code Here

TOP

Related Classes of mondrian.olap.Util.ByteMatcher

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.