/** * Get celldata type from value * @param value value * @return CellDataType */ public static CellDataType fromValue(String value) { if (value != null) { for (CellDataType cellDataType : values()) { if (cellDataType.type.equals(value)) { return cellDataType; } } } // Return a default value return getDefault(); }
/** * Generate class hashcode * * @return Class hashcode */ @Override public int hashCode() { // Get celldata hashcode (for comparison purposes) int hash = HASH_NUMBER; hash = HASH_MULTIPLIER * hash + (this.printable ? 1 : 0); hash = HASH_MULTIPLIER * hash + (this.stringValue != null ? this.stringValue.hashCode() : 0); hash = HASH_MULTIPLIER * hash + (this.objectValue != null ? this.objectValue.hashCode() : 0); hash = HASH_MULTIPLIER * hash + (this.type != null ? this.type.hashCode() : 0); return hash; }