public StringExpression(Expression<?> term) { super("(string) ", term); this.converter = new ToStringConverter(null); }
public ArrayCSVScript(char separator) { this.separator = separator; this.converter = new ToStringConverter(); }
public ArrayCSVScript(char separator) { this.separator = separator; this.converter = new ToStringConverter(); }
public DiffFactory() { this(new ToStringConverter()); }
.addConverter(String.class, new ToStringConverter())
OkHttpClient client = new OkHttpClient(); // client.interceptors().add(new UrlInterceptor()); client.interceptors().add(new LoggingInterceptor()); AppApi api = new Retrofit.Builder() .baseUrl("https://api.github.com") // add a converter for String .addConverter(String.class, new ToStringConverter()) .addConverterFactory(GsonConverterFactory.create()) .addCallAdapterFactory(RxJavaCallAdapterFactory.create()) .client(client) .build() .create(AppApi.class);
public PropertyTextField(Object bean, String propertyName, int length) { super(length); this.bean = bean; this.propertyName = propertyName; this.toStringConverter = new ToStringConverter(); this.locked = true; Listener listener = new Listener(); if (bean instanceof ObservableBean) ((ObservableBean) bean).addPropertyChangeListener(propertyName, listener); this.getDocument().addDocumentListener(listener); this.locked = false; refresh(); }
public PropertyPasswordField(Object bean, String propertyName, int length) { super(length); this.bean = bean; this.propertyName = propertyName; this.toStringConverter = new ToStringConverter(); this.locked = true; Listener listener = new Listener(); if (bean instanceof ObservableBean) ((ObservableBean) bean).addPropertyChangeListener(propertyName, listener); this.getDocument().addDocumentListener(listener); this.locked = false; refresh(); }
private static GitApiInterface gitApiInterface ; public static String baseUrl = "http://scorpioinfotech.net/demo" ; public static GitApiInterface getClient() { if (gitApiInterface == null) { OkHttpClient okClient = new OkHttpClient(); okClient.setReadTimeout(100, TimeUnit.MINUTES); // added okClient.setConnectTimeout(300,TimeUnit.MINUTES); //added okClient.interceptors().add(new Interceptor() { @Override public Response intercept(Chain chain) throws IOException { Response response = chain.proceed(chain.request()); return response; } }); Retrofit client = new Retrofit.Builder() .baseUrl(baseUrl) .addConverter(String.class, new ToStringConverter()) .client(okClient) .addConverterFactory(GsonConverterFactory.create()) .build(); gitApiInterface = client.create(GitApiInterface.class); } return gitApiInterface ; }
@SuppressWarnings({ "unchecked", "rawtypes" }) public PartScript(String prefixPattern, String ... propertyNames) { this.prefixFormat = (prefixPattern != null ? new MessageFormat(prefixPattern) : null); this.propertyNames = propertyNames; int length = propertyNames.length; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) propertyConverters[i] = new ToStringConverter(); this.converter = new ConverterChain( new BeanToPropertyArrayConverter(propertyNames), new ArrayConverter(Object.class, String.class, propertyConverters) ); this.elementCount = 0; this.buffer = new StringBuffer(); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public PartScript(String prefixPattern, String ... propertyNames) { this.prefixFormat = (prefixPattern != null ? new MessageFormat(prefixPattern) : null); this.propertyNames = propertyNames; int length = propertyNames.length; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) propertyConverters[i] = new ToStringConverter(); this.converter = new ConverterChain( new BeanToPropertyArrayConverter(propertyNames), new ArrayConverter(Object.class, String.class, propertyConverters) ); this.elementCount = 0; this.buffer = new StringBuffer(); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public ArrayFixedWidthScript(FixedWidthColumnDescriptor[] descriptors) { this.converters = new Converter[descriptors.length]; for (int i = 0; i < descriptors.length; i++) { FixedWidthColumnDescriptor descriptor = descriptors[i]; this.converters[i] = new ConverterChain( new ToStringConverter(), new FormatFormatConverter(String.class, new PadFormat(descriptor.getWidth(), descriptor.getAlignment(), ' '), true ) ); } }
@SuppressWarnings({ "unchecked", "rawtypes" }) public BeanCSVScript(String[] propertyNames, char separator) { this.separator = separator; int length = propertyNames.length; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) propertyConverters[i] = new ToStringConverter(); this.converter = new ConverterChain( new BeanToPropertyArrayConverter(propertyNames), new ArrayConverter(Object.class, String.class, propertyConverters) ); }
public PropertyTextArea(Object bean, String propertyName) { this.bean = bean; this.propertyName = propertyName; this.toStringConverter = new ToStringConverter(); this.setLineWrap(true); this.setWrapStyleWord(true); this.setRows(5); this.locked = true; Listener listener = new Listener(); if (bean instanceof ObservableBean) ((ObservableBean) bean).addPropertyChangeListener(propertyName, listener); this.getDocument().addDocumentListener(listener); this.locked = false; refresh(); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public BeanCSVScript(String[] propertyNames, char separator) { this.separator = separator; int length = propertyNames.length; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) propertyConverters[i] = new ToStringConverter(); this.converter = new ConverterChain( new BeanToFeatureArrayConverter(propertyNames.clone()), new ArrayConverter(Object.class, String.class, propertyConverters) ); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public BeanFixedWidthScript(FixedWidthColumnDescriptor[] descriptors) { int length = descriptors.length; String[] propertyNames = new String[length]; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) { FixedWidthColumnDescriptor descriptor = descriptors[i]; propertyNames[i] = descriptor.getName(); propertyConverters[i] = new ConverterChain( new ToStringConverter(), new FormatFormatConverter(String.class, descriptor.getFormat(), true ) ); } this.converter = new ConverterChain( new BeanToPropertyArrayConverter(propertyNames), new ArrayConverter(Object.class, String.class, propertyConverters) ); }
@SuppressWarnings({ "unchecked", "rawtypes" }) public BeanFixedWidthScript(FixedWidthColumnDescriptor[] descriptors) { int length = descriptors.length; String[] propertyNames = new String[length]; Converter[] propertyConverters = new Converter[length]; for (int i = 0; i < length; i++) { FixedWidthColumnDescriptor descriptor = descriptors[i]; propertyNames[i] = descriptor.getName(); propertyConverters[i] = new ConverterChain( new ToStringConverter(), new FormatFormatConverter(String.class, new PadFormat(descriptor.getWidth(), descriptor.getAlignment(), ' '), true ) ); } this.converter = new ConverterChain( new BeanToPropertyArrayConverter(propertyNames), new ArrayConverter(Object.class, String.class, propertyConverters) ); }