StringArrayUIType.java :  » Web-Framework » RSF » uk » org » ponder » rsf » uitype » Java Open Source

Java Open Source » Web Framework » RSF 
RSF » uk » org » ponder » rsf » uitype » StringArrayUIType.java
/*
 * Created on Nov 11, 2005
 */
package uk.org.ponder.rsf.uitype;

import uk.org.ponder.arrayutil.ArrayUtil;

public class StringArrayUIType implements UIType {
  public static final StringArrayUIType instance = new StringArrayUIType();
  private String[] PLACEHOLDER = new String[] {};

  public Object getPlaceholder() {
    return PLACEHOLDER;
  }

  public String getName() {
    return "stringarray";
  }

  public boolean valueUnchanged(Object oldvalue, Object newvalue) {
    String[] olds = (String[]) oldvalue;
    String[] news = (String[]) newvalue;
    return ArrayUtil.lexicalCompare(olds, olds.length, news, news.length) == 0;
  }

}
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.