1 41 42 package org.jfree.data; 43 44 45 49 public final class KeyedValueComparatorType { 50 51 52 public static final KeyedValueComparatorType BY_KEY 53 = new KeyedValueComparatorType("KeyedValueComparatorType.BY_KEY"); 54 55 56 public static final KeyedValueComparatorType BY_VALUE 57 = new KeyedValueComparatorType("KeyedValueComparatorType.BY_VALUE"); 58 59 60 private String name; 61 62 67 private KeyedValueComparatorType(String name) { 68 this.name = name; 69 } 70 71 76 public String toString() { 77 return this.name; 78 } 79 80 88 public boolean equals(Object o) { 89 if (this == o) { 90 return true; 91 } 92 if (!(o instanceof KeyedValueComparatorType)) { 93 return false; 94 } 95 96 KeyedValueComparatorType type = (KeyedValueComparatorType) o; 97 if (!this.name.equals(type.name)) { 98 return false; 99 } 100 101 return true; 102 } 103 104 109 public int hashCode() { 110 return this.name.hashCode(); 111 } 112 } 113 114 | Popular Tags |