Skip to content

Instantly share code, notes, and snippets.

@boldijar
Created May 28, 2016 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boldijar/7dee247da8dac55c374ea221100b873d to your computer and use it in GitHub Desktop.
Save boldijar/7dee247da8dac55c374ea221100b873d to your computer and use it in GitHub Desktop.
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