Package phonetalks.entities.subscriber

Examples of phonetalks.entities.subscriber.SubscriberEntry


        numberOwner.remove(entry);
        return col.remove(entry);
    }

    public SubscriberEntry addCall(String number, PhoneCall call) {
        SubscriberEntry entry = findByNumber(number);
        if (entry == null) {
            throw new UnexistingElementException("Cant add call to unexisting entry.");
        }
        entry.addCall(call);
        return entry;
    }
View Full Code Here


        entry.addCall(call);
        return entry;
    }

    public SubscriberEntry removeCall(String number, PhoneCall call) {
        SubscriberEntry entry = findByNumber(number);
        if (entry == null) {
            throw new UnexistingElementException("Cant remove from unexisting entry.");
        }
        entry.removeCall(call);
        return entry;
    }
View Full Code Here

        entry.removeCall(call);
        return entry;
    }

    public void addSubscriber(Subscriber subscriber, String number) {
        SubscriberEntry entry = new SubscriberEntry(subscriber, number);
        addEntry(entry);
    }
View Full Code Here

    public void addSub() {
        try {
            Subscriber s = new Subscriber(addSubFirst.getText(), addSubPatr.getText(),
                    addSubLast.getText());
            SubscriberEntry entry = new SubscriberEntry(s, addSubNumber.getText());
            base.addEntry(entry);
            printInfo("Subscriber added");
            printIndex();
        } catch (Exception e) {
            printInfo("Error while adding subscriber. Check it!");
View Full Code Here

    }

    public void findByNumber() {
        try {
            SubscriberEntry entry = base.findByNumber(findField.getText());
            String message = entry == null ? "No chance" : "Subscriber is: " + entry.getSubscriber();
            printInfo(message);
        } catch (Exception e) {
            printInfo("No way. Erorr.");
        }
View Full Code Here

TOP

Related Classes of phonetalks.entities.subscriber.SubscriberEntry

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.