Package gnu.trove.stack

Examples of gnu.trove.stack.TIntStack.push()


    public void testHashCode() {
        TIntStack stack = new TIntArrayStack();
        assertEquals( 0, stack.size() );

        stack.push( 10 );
        stack.push( 20 );
        assertEquals( 2, stack.size() );

        TIntStack other = new TIntArrayStack( 20 );
        other.push( 10 );
        other.push( 20 );
View Full Code Here


        stack.push( 10 );
        stack.push( 20 );
        assertEquals( 2, stack.size() );

        TIntStack other = new TIntArrayStack( 20 );
        other.push( 10 );
        other.push( 20 );
        assertEquals( 2, other.size() );

        assertTrue( "stack hashcode should equal itself: " + stack,
      stack.hashCode() == stack.hashCode() );
View Full Code Here

        stack.push( 20 );
        assertEquals( 2, stack.size() );

        TIntStack other = new TIntArrayStack( 20 );
        other.push( 10 );
        other.push( 20 );
        assertEquals( 2, other.size() );

        assertTrue( "stack hashcode should equal itself: " + stack,
      stack.hashCode() == stack.hashCode() );
View Full Code Here

      stack.hashCode() == stack.hashCode() );

        assertTrue( "stacks should be equal: " + stack + ", " + other,
      stack.hashCode() == other.hashCode() );

        other.push( 30 );
        assertFalse( "stack should not equal list: " + stack + ", " + other,
      stack.hashCode() == other.hashCode() );
    }

View Full Code Here

    }


    public void testSerialize() throws Exception {
        TIntStack stack = new TIntArrayStack();
        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
        stack.push( 40 );
        stack.push( 50 );
View Full Code Here


    public void testSerialize() throws Exception {
        TIntStack stack = new TIntArrayStack();
        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
        stack.push( 40 );
        stack.push( 50 );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

    public void testSerialize() throws Exception {
        TIntStack stack = new TIntArrayStack();
        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
        stack.push( 40 );
        stack.push( 50 );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream( baos );
View Full Code Here

    public void testSerialize() throws Exception {
        TIntStack stack = new TIntArrayStack();
        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
        stack.push( 40 );
        stack.push( 50 );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream( baos );
        oos.writeObject( stack );
View Full Code Here

        TIntStack stack = new TIntArrayStack();
        stack.push( 10 );
        stack.push( 20 );
        stack.push( 30 );
        stack.push( 40 );
        stack.push( 50 );

        ByteArrayOutputStream baos = new ByteArrayOutputStream();
        ObjectOutputStream oos = new ObjectOutputStream( baos );
        oos.writeObject( stack );
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.