當前位置: 首頁>>代碼示例>>Java>>正文


Java DataTable.createBasicInstance方法代碼示例

本文整理匯總了Java中com.belladati.sdk.dataset.data.DataTable.createBasicInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java DataTable.createBasicInstance方法的具體用法?Java DataTable.createBasicInstance怎麽用?Java DataTable.createBasicInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.belladati.sdk.dataset.data.DataTable的用法示例。


在下文中一共展示了DataTable.createBasicInstance方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: rowContentSet

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** can set row content through set method */
public void rowContentSet() {
	String content = "content";
	DataTable table = DataTable.createBasicInstance(column);

	DataRow row = table.createRow();
	row.set(column, content);

	assertEquals(row.get(column), content);
	assertEquals(row.getAll(), Arrays.asList(content));
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:12,代碼來源:DataSetDataTest.java

示例2: setOverwritePolicy

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** overwrite policy can be changed */
public void setOverwritePolicy() {
	DataTable table = DataTable.createBasicInstance(column);
	table.setOverwritePolicy(OverwritePolicy.deleteAll());
	assertNotEquals(table.getOverwritePolicy(), OverwritePolicy.deleteNone());
	assertEquals(table.getOverwritePolicy(), OverwritePolicy.deleteAll());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:8,代碼來源:DataSetDataTest.java

示例3: rowListImmutable

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** returned row list cannot be modified */
@Test(expectedExceptions = UnsupportedOperationException.class)
public void rowListImmutable() {
	DataTable table = DataTable.createBasicInstance(column);
	List<DataRow> rows = table.getRows();
	DataRow row = table.createRow();
	assertEquals(rows.size(), 0);
	rows.add(row);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:10,代碼來源:DataSetDataTest.java

示例4: columnsStringList

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** create with multiple columns passed as list */
public void columnsStringList() {
	String other = "other";
	DataTable table = DataTable.createBasicInstance(Arrays.asList(column, other));
	assertEquals(table.getColumns(), Arrays.asList(new DataColumn(column), new DataColumn(other)));
	assertEquals(table.createRow().getColumns(), table.getColumns());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:8,代碼來源:DataSetDataTest.java

示例5: rowEmpty

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** new rows are empty */
public void rowEmpty() {
	DataTable table = DataTable.createBasicInstance(column);
	DataRow row = table.createRow();

	assertNull(row.get(column));
	assertEquals(row.getAll(), Arrays.asList((String) null));
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:9,代碼來源:DataSetDataTest.java

示例6: rowContentSetOffset

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** can set row content through setAll method with offset */
public void rowContentSetOffset() {
	String content = "content";
	DataTable table = DataTable.createBasicInstance(column);

	DataRow row = table.createRow();
	row.setAll(0, content);

	assertEquals(row.get(column), content);
	assertEquals(row.getAll(), Arrays.asList(content));
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:12,代碼來源:DataSetDataTest.java

示例7: rowContentCreate

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** can set row content through creation */
public void rowContentCreate() {
	String content = "content";
	DataTable table = DataTable.createBasicInstance(column);

	DataRow row = table.createRow(content).getRows().get(0);

	assertEquals(row.get(column), content);
	assertEquals(row.getAll(), Arrays.asList(content));
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:11,代碼來源:DataSetDataTest.java

示例8: createRows

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** create rows */
public void createRows() {
	DataTable table = DataTable.createBasicInstance(column);
	assertEquals(table.getRows().size(), 0);
	table.createRow();
	assertEquals(table.getRows().size(), 1);
	table.createRow("abc");
	assertEquals(table.getRows().size(), 2);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:10,代碼來源:DataSetDataTest.java

示例9: tableRows

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** convert table with rows and columns */
public void tableRows() {
	final String content1 = "content1";
	final String content2 = "content2";

	DataTable table = DataTable.createBasicInstance(column);
	DataRow row1 = table.createRow().setAll(content1);
	DataRow row2 = table.createRow().setAll(content2);

	JsonNode tableJson = table.toJson();
	ArrayNode rows = (ArrayNode) tableJson.get("data");
	assertEquals(rows.get(0), row1.toJson());
	assertEquals(rows.get(1), row2.toJson());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-java,代碼行數:15,代碼來源:DataSetDataTest.java

示例10: overwriteValue

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** can overwrite row values */
public void overwriteValue() {
	String content = "content";
	DataTable table = DataTable.createBasicInstance(column);

	DataRow row = table.createRow();
	row.set(column, "other").set(column, content);

	assertEquals(row.get(column), content);
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:11,代碼來源:DataSetDataTest.java

示例11: tablePolicy

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** convert table policy */
public void tablePolicy() {
	DataTable table = DataTable.createBasicInstance(column);
	assertEquals(table.toJson().get("overwrite"), table.getOverwritePolicy().toJson());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:6,代碼來源:DataSetDataTest.java

示例12: tooManyValuesRow

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** setting more values than columns on a row */
@Test(expectedExceptions = TooManyColumnsException.class)
public void tooManyValuesRow() {
	DataTable table = DataTable.createBasicInstance(column);
	table.createRow().setAll("", "");
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:7,代碼來源:DataSetDataTest.java

示例13: tooHighOffset

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** setting values with too high offset */
@Test(expectedExceptions = TooManyColumnsException.class)
public void tooHighOffset() {
	DataTable table = DataTable.createBasicInstance(column);
	table.createRow().setAll(1, "");
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:7,代碼來源:DataSetDataTest.java

示例14: tooFewValues

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** not setting all values using setAll */
public void tooFewValues() {
	DataTable table = DataTable.createBasicInstance(column);
	assertEquals(table.createRow().setAll().getAll(), Arrays.asList((String) null));
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:6,代碼來源:DataSetDataTest.java

示例15: column

import com.belladati.sdk.dataset.data.DataTable; //導入方法依賴的package包/類
/** create with single column */
public void column() {
	DataTable table = DataTable.createBasicInstance(column);
	assertEquals(table.getColumns(), Arrays.asList(new DataColumn(column)));
	assertEquals(table.createRow().getColumns(), table.getColumns());
}
 
開發者ID:BellaDati,項目名稱:belladati-sdk-android,代碼行數:7,代碼來源:DataSetDataTest.java


注:本文中的com.belladati.sdk.dataset.data.DataTable.createBasicInstance方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。