001package org.hl7.fhir.utilities;
002
003import java.util.Comparator;
004
005public class StringPair {
006  
007  public static class Sorter implements Comparator<StringPair> {
008
009    @Override
010    public int compare(StringPair o1, StringPair o2) {
011      int res = o1.name.compareTo(o2.name);
012      if (res == 0) {
013        res = o1.value.compareTo(o2.value);
014      }
015      return res;
016    }
017    
018  }
019  private String name;
020  private String value;
021
022  public StringPair(String name, String value) {
023    super();
024    this.name = name;
025    this.value = value;
026  }
027
028  public String getName() {
029    return name;
030  }
031
032  public String getValue() {
033    return value;
034  }
035}