Package phonetalks.entities.collections

Examples of phonetalks.entities.collections.CardIndex


     */
    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());
        }
       
View Full Code Here


    }

    @Override
    public CardIndex readIndex() {
        FileInputStream fin = null;
        CardIndex result = null;
        try {

            fin = new FileInputStream(inputPath);
            ObjectInputStream objIn = new ObjectInputStream(fin);
            result = (CardIndex) objIn.readObject();
View Full Code Here

TOP

Related Classes of phonetalks.entities.collections.CardIndex

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.