Package phonetalks.io

Examples of phonetalks.io.BinaryFileIndexSaver


    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {

        BinaryFileIndexSaver saver = new BinaryFileIndexSaver("out.bin", "writehere.bin");

        CardIndex index2 = saver.readIndex();
       
        PhoneCall call1 = new PhoneCall("777", 1, new GregorianCalendar(1999, 1, 1));
        PhoneCall call2 = new PhoneCall("142", 2, new GregorianCalendar(2011, 1, 1));
        PhoneCall call3 = new PhoneCall("777", 3, new GregorianCalendar(4555, 1, 1));
       
        index2.addCall("3300052", call3);
        index2.addCall("7555909", call2);
        index2.addCall("3494090", call1);
       
        for (Subscriber s : index2.keySet()) {
            PriorityQueue<SubscriberEntry> col = index2.get(s);
            for (SubscriberEntry se : col) {
                System.out.println(se.toString());
            }
        }
       
        ArrayList<SubscriberCallPair> al;
        al = index2.getAllCalls("777");
       
        for (SubscriberCallPair callPair : al) {
            System.out.println(callPair.toString());
        }
       
        saver.writeIndex(index2);
       
       
       
       
    }
View Full Code Here

TOP

Related Classes of phonetalks.io.BinaryFileIndexSaver

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.