当前位置: 首页>>代码示例>>Java>>正文


Java TupleInput.readInt方法代码示例

本文整理汇总了Java中com.sleepycat.bind.tuple.TupleInput.readInt方法的典型用法代码示例。如果您正苦于以下问题:Java TupleInput.readInt方法的具体用法?Java TupleInput.readInt怎么用?Java TupleInput.readInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.sleepycat.bind.tuple.TupleInput的用法示例。


在下文中一共展示了TupleInput.readInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
public Object entryToObject(TupleInput ti) {

        String sku = ti.readString();
        String itemName = ti.readString();
        String category = ti.readString();
        String vendor = ti.readString();
        int vendorInventory = ti.readInt();
        float vendorPrice = ti.readFloat();

        Inventory inventory = new Inventory();
        inventory.setSku(sku);
        inventory.setItemName(itemName);
        inventory.setCategory(category);
        inventory.setVendor(vendor);
        inventory.setVendorInventory(vendorInventory);
        inventory.setVendorPrice(vendorPrice);

        return inventory;
    }
 
开发者ID:nologic,项目名称:nabs,代码行数:20,代码来源:InventoryBinding.java

示例2: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
public Beacon entryToObject(TupleInput ti) {
   String scannerID = ti.readString();
   String uuid = ti.readString();
   int code = ti.readInt();
   int manufacturer = ti.readInt();
   int major = ti.readInt();
   int minor = ti.readInt();
   int power = ti.readInt();
   int calibratedPower = ti.readInt();
   int rssi = ti.readInt();
   long time = ti.readLong();
   int messageType = ti.readInt();

   Beacon beacon = new Beacon(scannerID, uuid, code, manufacturer, major, minor, power, rssi, time);
   beacon.setCalibratedPower(calibratedPower);
   beacon.setMessageType(messageType);

   return beacon;
}
 
开发者ID:starksm64,项目名称:RaspberryPiBeaconParser,代码行数:20,代码来源:BeaconBinding.java

示例3: readValue

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
private static Object readValue(final TupleInput ti) {
	final String type = ti.readString();
	switch (type) {
		case "NULL":
			return null;
		case "F":
			return ti.readFloat();
		case "L":
			return ti.readLong();
		case "I":
			return ti.readInt();
		case "D":
			return ti.readDouble();
		case "S":
			return ti.readString();
		case "*":
			final int size = ti.readInt();
			final Set set = new HashSet();
			for (int i = 0; i < size; i++) {
				set.add(readValue(ti));
			}
			return set;
		default:
			throw new IllegalArgumentException(" type " + type + " non reconnu");
	}
}
 
开发者ID:KleeGroup,项目名称:vertigo-labs,代码行数:27,代码来源:BerkeleyDataBinding.java

示例4: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Object entryToObject(TupleInput ti) {
  int numberofentries = ti.readInt();
  SortedIntList2FloatMap map = new SortedIntList2FloatMap(numberofentries);
  //float squarednorm = ti.readFloat();
  ti.readFloat();
  for (int i = 0; i < numberofentries; i++) {
    map.addEntry(ti.readInt(), ti.readFloat());
  }
  ConceptVector conceptvector = new ConceptVector(ontology, map);
  return conceptvector;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:13,代码来源:RecordDataBaseBinding.java

示例5: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Object entryToObject(TupleInput ti) {
  ConceptToConceptVectorRecordIndexEntry conceptToRecordIndexEntry = new ConceptToConceptVectorRecordIndexEntry();
  conceptToRecordIndexEntry.sumOfValuesInRecords = ti.readFloat();
  int numberofentries = ti.readInt();
  IntList list = new IntList(numberofentries);
  
  for (int i=0; i<numberofentries;i++){
    list.add(ti.readInt());
  }
  conceptToRecordIndexEntry.conceptVectorRecordIDs = new SortedIntListSet(list);
  
  return conceptToRecordIndexEntry;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:15,代码来源:ConceptToRecordIndexEntryBinding.java

示例6: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Object entryToObject(TupleInput ti) {

  int numberofentries = ti.readInt();
  IntList list = new IntList(numberofentries);

  for (int i = 0; i < numberofentries; i++) {

    list.add(ti.readInt());
  }
  SortedIntListSet set = new SortedIntListSet(list);

  return set;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:15,代码来源:IntegerToSetOfIntegersBinding.java

示例7: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Object entryToObject(TupleInput arg0) {
  BatchwiseIntegerID result = new BatchwiseIntegerID();
  result.batchID=arg0.readInt();
  result.ID=arg0.readInt();
  return result;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:8,代码来源:BatchNumberAndIntegerIDBinding.java

示例8: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Object entryToObject(TupleInput ti) {
  int size = ti.readInt();
  SortedIntList2IntMap result  = new SortedIntList2IntMap(size);
  for (int i=0;i<size;i++){
    result.addEntry(ti.readInt(), ti.readInt());
  }
  return result;
}
 
开发者ID:BiosemanticsDotOrg,项目名称:GeneDiseasePaper,代码行数:10,代码来源:Integer2Integer2IntegerMapBinding.java

示例9: readTuple

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
void readTuple(TupleInput _input) {

            field1 = _input.readString();
            field2 = _input.readString();
            field3 = _input.readInt();
            field4 = _input.readInt();
            field5 = _input.readString();
        }
 
开发者ID:nologic,项目名称:nabs,代码行数:9,代码来源:BindingSpeedTest.java

示例10: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Beacon entryToObject(TupleInput input) {
   long time = input.readLong();
   int minor = input.readInt();
   Beacon key = new Beacon();
   key.setTime(time);
   key.setMinor(minor);
   return key;
}
 
开发者ID:starksm64,项目名称:RaspberryPiBeaconParser,代码行数:10,代码来源:BeaconEventKeyBinding.java

示例11: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public Properties entryToObject(TupleInput input) {
   Properties properties = new Properties();
   int count = input.readInt();
   for(int n = 0; n < count; n ++) {
      String key = input.readString();
      String value = input.readString();
      properties.setProperty(key, value);
   }
   return properties;
}
 
开发者ID:starksm64,项目名称:RaspberryPiBeaconParser,代码行数:12,代码来源:ScannerHealthBinding.java

示例12: doEntryToMdc

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
private static MetaDataContainer doEntryToMdc(final TupleInput ti) {
	final MetaDataContainerBuilder metaDataContainerBuilder = new MetaDataContainerBuilder();
	final int size = ti.readInt();
	for (int i = 0; i < size; i++) {
		final String metaDataClassName = ti.readString();
		final String metaDataName = ti.readString();
		final Class<? extends Enum> metaDataClass = (Class<? extends Enum>) ClassUtil.classForName(metaDataClassName);
		final MetaData metaData = (MetaData) Enum.valueOf(metaDataClass, metaDataName);
		final boolean valueNotNull = ti.readBoolean();
		final Object value;
		if (valueNotNull) {
			switch (metaData.getType()) {
				case DATE:
					value = new Date(ti.readLong());
					break;
				case INTEGER:
					value = ti.readInt();
					break;
				case LONG:
					value = ti.readLong();
					break;
				case STRING:
					value = ti.readString();
					break;
				default:
					throw new IllegalStateException(StringUtil.format("Type de meta-donn�es non g�r� : {0} pour {1}.{2}", metaData.getType(), metaDataClassName, metaDataName));
			}
		} else {
			value = null;
		}
		metaDataContainerBuilder.withMetaData(metaData, value);
	}
	return metaDataContainerBuilder.build();
}
 
开发者ID:KleeGroup,项目名称:vertigo-labs,代码行数:35,代码来源:DocumentBinding.java

示例13: doEntryToMdc

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
protected static final MetaDataContainer doEntryToMdc(final TupleInput ti) {
	final MetaDataContainerBuilder metaDataContainerBuilder = new MetaDataContainerBuilder();
	final int size = ti.readInt();
	for (int i = 0; i < size; i++) {
		final String metaDataClassName = ti.readString();
		final String metaDataName = ti.readString();
		final Class<? extends Enum> metaDataClass = (Class<? extends Enum>) ClassUtil.classForName(metaDataClassName);
		final MetaData metaData = (MetaData) Enum.valueOf(metaDataClass, metaDataName);
		final boolean valueNotNull = ti.readBoolean();
		final Object value;
		if (valueNotNull) {
			switch (metaData.getType()) {
				case DATE:
					value = new Date(ti.readLong());
					break;
				case INTEGER:
					value = ti.readInt();
					break;
				case LONG:
					value = ti.readLong();
					break;
				case STRING:
					value = ti.readString();
					break;
				default:
					throw new RuntimeException(StringUtil.format("Type de meta-donn�es non g�r� : {0} pour {1}.{2}", null, metaData.getType(), metaDataClassName, metaDataName));
			}
		} else {
			value = null;
		}
		metaDataContainerBuilder.withMetaData(metaData, value);
	}
	return metaDataContainerBuilder.build();
}
 
开发者ID:KleeGroup,项目名称:vertigo-labs,代码行数:35,代码来源:AbstractDocumentBindingReader.java

示例14: entryToObject

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
@Override
public RepGroupImpl entryToObject(TupleInput input) {
    return new RepGroupImpl(input.readString(),
                                  new UUID(input.readLong(),
                                           input.readLong()),
                                  input.readInt(),
                                  input.readInt(),
                                  input.readInt(),
                                  null);
}
 
开发者ID:prat0318,项目名称:dbms,代码行数:11,代码来源:RepGroupDB.java

示例15: deserialize

import com.sleepycat.bind.tuple.TupleInput; //导入方法依赖的package包/类
/** Serializes from a TupleInput after retrieving from storage. */
public static NameIdPair deserialize(TupleInput buffer) {
    return new NameIdPair(buffer.readString(), buffer.readInt());
}
 
开发者ID:prat0318,项目名称:dbms,代码行数:5,代码来源:NameIdPair.java


注:本文中的com.sleepycat.bind.tuple.TupleInput.readInt方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。