use of java.lang.Integer in project geode by apache.
the class TypeRegistry method defineType.
/**
* Create a type id for a type that may come locally, or from a remote member.
*/
public int defineType(PdxType newType) {
Integer existingId = this.typeToId.get(newType);
if (existingId != null) {
int eid = existingId;
newType.setTypeId(eid);
return eid;
}
int id = this.distributedTypeRegistry.defineType(newType);
newType.setTypeId(id);
PdxType oldType = this.idToType.get(id);
if (oldType == null) {
this.idToType.put(id, newType);
this.typeToId.put(newType, id);
if (logger.isInfoEnabled()) {
logger.info("Caching {}", newType.toFormattedString());
}
} else if (!oldType.equals(newType)) {
Assert.fail("Old type does not equal new type for the same id. oldType=" + oldType + " new type=" + newType);
}
return id;
}
use of java.lang.Integer in project intellij-community by JetBrains.
the class A method test.
void test() {
Integer integer = null;
int i = integer.to < caret > String().length();
}
use of java.lang.Integer in project intellij-community by JetBrains.
the class X method m.
void m() {
Integer i1 = new Integer(0);
Integer i2 = new Integer(2);
boolean b = i1.equals(i2);
}
use of java.lang.Integer in project commoncrawl-examples by commoncrawl.
the class ArcRecord method setArcRecordHeader.
/**
* <p>Parses and sets the ARC record header fields.</p>
* <p>Currently, this method expects the ARC record header string to contain
* the following fields, in order, separated by space:
* <ul>
* <li>URL</li>
* <li>IP Address</li>
* <li>Archive Date</li>
* <li>Content Type</li>
* <li>Content Length</li>
* </ul>
* </p>
* <p>For more information on the arc file format, see
* {@link http://www.archive.org/web/researcher/ArcFileFormat.php}.</p>
*
* @param arcRecordHeader The first line of an ARC file entry - the header
* line for an ARC file item.
*/
public void setArcRecordHeader(String arcRecordHeader) throws IllegalArgumentException, ParseException {
if (arcRecordHeader == null || arcRecordHeader.equals(""))
throw new IllegalArgumentException("ARC v1 record header string is empty.");
String[] metadata = arcRecordHeader.split(" ");
if (metadata.length != 5) {
LOG.info(" [ " + arcRecordHeader + " ] ");
throw new IllegalArgumentException("ARC v1 record header must be 5 fields.");
}
SimpleDateFormat format = new SimpleDateFormat("yyyyMMddHHmmss");
this._url = metadata[0];
this._ipAddress = metadata[1];
this._archiveDate = format.parse(metadata[2]);
this._contentType = metadata[3];
this._contentLength = (new Integer(metadata[4])).intValue();
}
use of java.lang.Integer in project storio by pushtorefresh.
the class BoxedTypesMethodsConstructorIgnoreNullStorIOContentResolverGetResolver method mapFromCursor.
/**
* {@inheritDoc}
*/
@Override
@NonNull
public BoxedTypesMethodsConstructorIgnoreNull mapFromCursor(@NonNull Cursor cursor) {
Boolean field1 = null;
if (!cursor.isNull(cursor.getColumnIndex("field1"))) {
field1 = cursor.getInt(cursor.getColumnIndex("field1")) == 1;
}
Short field2 = null;
if (!cursor.isNull(cursor.getColumnIndex("field2"))) {
field2 = cursor.getShort(cursor.getColumnIndex("field2"));
}
Integer field3 = null;
if (!cursor.isNull(cursor.getColumnIndex("field3"))) {
field3 = cursor.getInt(cursor.getColumnIndex("field3"));
}
Long field4 = null;
if (!cursor.isNull(cursor.getColumnIndex("field4"))) {
field4 = cursor.getLong(cursor.getColumnIndex("field4"));
}
Float field5 = null;
if (!cursor.isNull(cursor.getColumnIndex("field5"))) {
field5 = cursor.getFloat(cursor.getColumnIndex("field5"));
}
Double field6 = null;
if (!cursor.isNull(cursor.getColumnIndex("field6"))) {
field6 = cursor.getDouble(cursor.getColumnIndex("field6"));
}
BoxedTypesMethodsConstructorIgnoreNull object = new BoxedTypesMethodsConstructorIgnoreNull(field1, field2, field3, field4, field5, field6);
return object;
}
Aggregations