Created
May 28, 2016 15:22
-
-
Save boldijar/7dee247da8dac55c374ea221100b873d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.bolnizar.sda; | |
/** | |
* Created by Paul on 5/28/2016. | |
*/ | |
public class Dictionary { | |
enum Order { | |
ASCENDING, | |
DESCENDING | |
} | |
private Order mOrder; | |
private Iterator mIterator; | |
/** | |
* Sets the order of the dictionary | |
*/ | |
public void create(Order order) { | |
mOrder = order; | |
} | |
/** | |
* ads a new key-value pair | |
*/ | |
public void add(String key, String url) { | |
} | |
/** | |
* deletes the value with the choosen key from the dictionary | |
*/ | |
public void delete(String key) { | |
} | |
/** | |
* searches for the value with the choosen key | |
*/ | |
public String find(String key) { | |
return null; | |
} | |
/* | |
returns the size of the dictionary | |
*/ | |
public int size() { | |
return 0; | |
} | |
/* | |
returns true if list is void, false otherwise | |
*/ | |
public boolean isVoid() { | |
return size() == 0; | |
} | |
/* | |
creates the iterator for this dictionary | |
*/ | |
public void createIterator() { | |
mIterator = new Iterator(this); | |
} | |
/* | |
delets the iterator | |
*/ | |
public void disposeIterator() { | |
mIterator = null; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment