// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/util/StringListWrapper.java
// public static class Entry {
// 
//   private String value;
//   private long time;
// 
//   Entry(byte[] value, long time) {
//     this(new String(value), time);
//   }
// 
//   Entry(String value, long time) {
//     this.value = value;
//     this.time = time;
//   }
// 
//   public String getValue() {
//     return value;
//   }
// 
//   public long getTime() {
//     return time;
//   }
// 
//   @Override
//   public String toString() {
//     return value + "_" + time;
//   }
// }


import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.util.StringListWrapper.Entry;

      ret = true;
    } else { // getListSize() != 0
      ret = getListSize() >= rawList.size();
      if (!ret) {
        rawList = limitListSize(rawList, getListSize());
      }
    }
    return ret && sWrapper.put(key, toString(rawList));
  }

  public boolean deleteAndPrepend(String key, String value)
      throws ClientException {
    List<String> rawList = getRawList(sWrapper, key);
    Date d = new Date();
    if (getExpiry() != 0) {
      rawList = limitExpiry(rawList, d.getTime(), getExpiry());
    }
    remove(rawList, value);
    rawList.add(0, value + SEP + d.getTime());
    if (getListSize() != 0 && getListSize() < rawList.size()) {
      rawList = limitListSize(rawList, getListSize());
    }
    return sWrapper.put(key, toString(rawList));
  }

  public List<String> get(String key) throws ClientException {
    List<String> rawList = getRawList(sWrapper, key);
    return toStringList(rawList);
  }


// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/ClientException.java
// public class ClientException extends Exception {
//   private static final long serialVersionUID = -7032182229500031385L;
// 
//   public ClientException() {
//     super();
//   }
// 
//   public ClientException(Throwable cause) {
//     super(cause);
//   }
// 
//   public ClientException(String reason) {
//     super(reason);
//   }
// 
//   public ClientException(String reason, Throwable cause) {
//     super(reason, cause);
//   }
// }
// 
// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/util/StringListWrapper.java
// public static class Entry {
// 
//   private String value;
//   private long time;
// 
//   Entry(byte[] value, long time) {
//     this(new String(value), time);
//   }
// 
//   Entry(String value, long time) {
//     this.value = value;
//     this.time = time;
//   }
// 
//   public String getValue() {
//     return value;
//   }
// 
//   public long getTime() {
//     return time;
//   }
// 
//   @Override
//   public String toString() {
//     return value + "_" + time;
//   }
// }


// Path: java/client/src/main/java/jp/co/rakuten/rit/roma/client/util/StringListAdaptor1Impl.java
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import java.util.StringTokenizer;
import jp.co.rakuten.rit.roma.client.ClientException;
import jp.co.rakuten.rit.roma.client.util.StringListWrapper.Entry;

      ret = true;
    } else { // getListSize() != 0
      ret = getListSize() >= rawList.size();
      if (!ret) {
        rawList = limitListSize(rawList, getListSize());
      }
    }
    return ret && sWrapper.put(key, toString(rawList));
  }

  public boolean deleteAndPrepend(String key, String value)
      throws ClientException {
    List<String> rawList = getRawList(sWrapper, key);
    Date d = new Date();
    if (getExpiry() != 0) {
      rawList = limitExpiry(rawList, d.getTime(), getExpiry());
    }
    remove(rawList, value);
    rawList.add(0, value + SEP + d.getTime());
    if (getListSize() != 0 && getListSize() < rawList.size()) {
      rawList = limitListSize(rawList, getListSize());
    }
    return sWrapper.put(key, toString(rawList));
  }

  public List<String> get(String key) throws ClientException {
    List<String> rawList = getRawList(sWrapper, key);
    return toStringList(rawList);
  }


  public List<Entry> getEntries(String key) throws ClientException {
