home *** CD-ROM | disk | FTP | other *** search
/ Cre@te Online 2000 December / Cre@teOnline CD05.iso / MacSoft / XML ConsoleMax.sea / XML ConsoleMax / Required / ldapjdk.jar / netscape / ldap / LDAPSortKey.class (.txt) < prev    next >
Encoding:
Java Class File  |  1999-04-13  |  997 b   |  57 lines

  1. package netscape.ldap;
  2.  
  3. public class LDAPSortKey {
  4.    public static final int REVERSE = 129;
  5.    private String m_key;
  6.    private boolean m_reverse;
  7.    private String m_matchRule;
  8.  
  9.    public LDAPSortKey(String var1) {
  10.       if (var1 != null && var1.length() > 0) {
  11.          if (var1.charAt(0) == '-') {
  12.             this.m_reverse = true;
  13.             this.m_key = var1.substring(1);
  14.          } else {
  15.             this.m_reverse = false;
  16.             this.m_key = var1;
  17.          }
  18.  
  19.          int var2 = this.m_key.indexOf(58);
  20.          if (var2 == 0) {
  21.             this.m_key = null;
  22.             return;
  23.          }
  24.  
  25.          if (var2 > 0) {
  26.             this.m_matchRule = this.m_key.substring(var2 + 1);
  27.             this.m_key = this.m_key.substring(0, var2);
  28.          }
  29.       }
  30.  
  31.    }
  32.  
  33.    public LDAPSortKey(String var1, boolean var2) {
  34.       this.m_key = var1;
  35.       this.m_reverse = var2;
  36.       this.m_matchRule = null;
  37.    }
  38.  
  39.    public LDAPSortKey(String var1, boolean var2, String var3) {
  40.       this.m_key = var1;
  41.       this.m_reverse = var2;
  42.       this.m_matchRule = var3;
  43.    }
  44.  
  45.    public String getKey() {
  46.       return this.m_key;
  47.    }
  48.  
  49.    public boolean getReverse() {
  50.       return this.m_reverse;
  51.    }
  52.  
  53.    public String getMatchRule() {
  54.       return this.m_matchRule;
  55.    }
  56. }
  57.