@Test(dataProvider = "invalid strings") public void testIsValidWithInvalidInput(String input) { assertFalse("Invalid input string was evaluated as valid: " + input, GradoopId.isValid(input)); }
public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if (c >= '0' && c <= '9') { continue; } if (c >= 'a' && c <= 'f') { continue; } if (c >= 'A' && c <= 'F') { continue; } return false; } return true; }
GradoopId implements NormalizableKey<GradoopId>, CopyableValue<GradoopId> { public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if (c >= '0' && c <= '9') { continue; } if (c >= 'a' && c <= 'f') { continue; } if (c >= 'A' && c <= 'F') { continue; } return false; } return true; } }
GradoopId implements NormalizableKey<GradoopId>, CopyableValue<GradoopId> { public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if (c >= '0' && c <= '9') { continue; } if (c >= 'a' && c <= 'f') { continue; } if (c >= 'A' && c <= 'F') { continue; } return false; } return true; } GradoopId(); private  GradoopId(byte[] bytes);  GradoopId(final int timestamp, final int machineIdentifier,
    final short processIdentifier, final int counter); private  GradoopId(final int timestamp, final int machineIdentifier, final short processIdentifier,
    final int counter, final boolean checkCounter); }
GradoopId implements NormalizableKey<GradoopId>, CopyableValue<GradoopId> { public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if (c >= '0' && c <= '9') { continue; } if (c >= 'a' && c <= 'f') { continue; } if (c >= 'A' && c <= 'F') { continue; } return false; } return true; } GradoopId(); private  GradoopId(byte[] bytes);  GradoopId(final int timestamp, final int machineIdentifier,
    final short processIdentifier, final int counter); private  GradoopId(final int timestamp, final int machineIdentifier, final short processIdentifier,
    final int counter, final boolean checkCounter); static GradoopId get(); static GradoopId fromString(String string); static boolean isValid(final String hexString); static GradoopId fromByteArray(byte[] bytes); byte[] toByteArray(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(GradoopId other); @Override String toString(); @Override int getMaxNormalizedKeyLen(); @Override void copyNormalizedKey(MemorySegment target, int offset, int len); @Override void write(DataOutputView out); @Override void read(DataInputView in); @Override int getBinaryLength(); @Override void copyTo(GradoopId target); @Override GradoopId copy(); @Override void copy(DataInputView source, DataOutputView target); static GradoopId min(GradoopId first, GradoopId second); }
GradoopId implements NormalizableKey<GradoopId>, CopyableValue<GradoopId> { public static boolean isValid(final String hexString) { if (hexString == null) { throw new IllegalArgumentException(); } int len = hexString.length(); if (len != 24) { return false; } for (int i = 0; i < len; i++) { char c = hexString.charAt(i); if (c >= '0' && c <= '9') { continue; } if (c >= 'a' && c <= 'f') { continue; } if (c >= 'A' && c <= 'F') { continue; } return false; } return true; } GradoopId(); private  GradoopId(byte[] bytes);  GradoopId(final int timestamp, final int machineIdentifier,
    final short processIdentifier, final int counter); private  GradoopId(final int timestamp, final int machineIdentifier, final short processIdentifier,
    final int counter, final boolean checkCounter); static GradoopId get(); static GradoopId fromString(String string); static boolean isValid(final String hexString); static GradoopId fromByteArray(byte[] bytes); byte[] toByteArray(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(GradoopId other); @Override String toString(); @Override int getMaxNormalizedKeyLen(); @Override void copyNormalizedKey(MemorySegment target, int offset, int len); @Override void write(DataOutputView out); @Override void read(DataInputView in); @Override int getBinaryLength(); @Override void copyTo(GradoopId target); @Override GradoopId copy(); @Override void copy(DataInputView source, DataOutputView target); static GradoopId min(GradoopId first, GradoopId second); static final int ID_SIZE; static final GradoopId NULL_VALUE; }