Integer a = 127;
Integer b = 127;
System.out.println(a == b); // true
Integer i = 128;
Integer j = 128;
System.out.println(i == j); //false
System.out.println(i.equals(j)); //true
Double a = 1998d;
Double b = 1998d;
System.out.println(a == b); // false
System.out.println(a.equals(b)); // true
iterator.next();
Tupple2<PaymentRBS, PaymentPartner>
. Т.о. в одном таппле были бы оба объекта с одинаковыми номером счета. Но ведь я использую 3 версию, почему вылетает ошибка?
dependencies {
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test:rules:1.0.2'
implementation 'com.android.support:support-annotations:28.0.0'
implementation 'com.android.billingclient:billing:2.0.1' // Видимо об этом идет речь
}
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.type.TypeFactory;
import com.fasterxml.jackson.databind.util.Converter;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import static org.apache.http.util.TextUtils.isBlank;
public class CustomStringToLocalDateTimeConverter implements Converter<String, LocalDateTime> {
@Override
public LocalDateTime convert(String value) {
if (isBlank(value)) return null;
var formatter = DateTimeFormatter.ISO_OFFSET_DATE_TIME; // Вот тут задается формат даты
return LocalDateTime.parse(value, formatter);
}
@Override
public JavaType getInputType(TypeFactory typeFactory) {
return typeFactory.constructType(String.class);
}
@Override
public JavaType getOutputType(TypeFactory typeFactory) {
return typeFactory.constructType(LocalDateTime.class);
}
}
class WithDate {
@JsonDeserialize(converter = CustomStringToLocalDateTimeConverter.class)
private LocalDateTime startTime;
}