Skip to content

Commit

Permalink
Merge pull request #1 from gameontext/client_calls
Browse files Browse the repository at this point in the history
Add keySet() method to SignedRequestMap
  • Loading branch information
pavittr authored Jul 13, 2016
2 parents 6f5902a + 5b15e8b commit 664f2ab
Showing 1 changed file with 24 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import java.util.Arrays;
import java.util.List;
import java.util.Map;
import java.util.Set;

import javax.ws.rs.core.MultivaluedHashMap;
import javax.ws.rs.core.MultivaluedMap;
Expand Down Expand Up @@ -46,7 +47,9 @@ public interface SignedRequestMap {
public String getFirst(String key);

public String getAll(String key, String defaultValue);


public Set<String> keySet();


/**
* Wrap around a MultivaluedMap<String, Object>
Expand Down Expand Up @@ -87,6 +90,11 @@ public String getAll(String key, String defaultValue) {
public String toString() {
return mvso.toString();
}

@Override
public Set<String> keySet() {
return mvso.keySet();
}
}

/**
Expand Down Expand Up @@ -127,6 +135,11 @@ public String getAll(String key, String defaultValue) {
public String toString() {
return mvss.toString();
}

@Override
public Set<String> keySet() {
return mvss.keySet();
}
}

static class QueryParameterMap implements SignedRequestMap {
Expand Down Expand Up @@ -182,6 +195,11 @@ private void unpack() {
public String toString() {
return mvss.toString();
}

@Override
public Set<String> keySet() {
return mvss.keySet();
}
}

/**
Expand Down Expand Up @@ -227,5 +245,10 @@ public String getAll(String key, String defaultValue) {
public String toString() {
return mls.toString();
}

@Override
public Set<String> keySet() {
return mls.keySet();
}
}
}

0 comments on commit 664f2ab

Please sign in to comment.