本文整理汇总了C#中java.util.ArrayList类的典型用法代码示例。如果您正苦于以下问题:C# ArrayList类的具体用法?C# ArrayList怎么用?C# ArrayList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArrayList类属于java.util命名空间,在下文中一共展示了ArrayList类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: DowngradeActionMap
public DowngradeActionMap()
{
base.\u002Ector();
DowngradeActionMap downgradeActionMap = this;
this.actionMap = new HashMap();
this.actionList = new ArrayList();
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:DowngradeActionMap.cs
示例2: EntityPainting
public EntityPainting(World world, int i, int j, int k, int l)
: this(world)
{
xPosition = i;
yPosition = j;
zPosition = k;
var arraylist = new ArrayList();
EnumArt[] aenumart = EnumArt.values();
int i1 = aenumart.Length;
for (int j1 = 0; j1 < i1; j1++)
{
EnumArt enumart = aenumart[j1];
art = enumart;
func_179_a(l);
if (onValidSurface())
{
arraylist.add(enumart);
}
}
if (arraylist.size() > 0)
{
art = (EnumArt) arraylist.get(rand.nextInt(arraylist.size()));
}
func_179_a(l);
}
开发者ID:riverar,项目名称:Crafty,代码行数:26,代码来源:EntityPainting.cs
示例3: getCollidingBoundingBoxes
public override void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb,
ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
base.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
开发者ID:riverar,项目名称:Crafty,代码行数:34,代码来源:BlockStairs.cs
示例4: super
: super(declaringType, name) {
parameters = new ArrayList<ParameterInfo>();
exceptions = new ArrayList<TypeInfo>();
genericArguments = new ArrayList<TypeInfo>();
annotations = new ArrayList<AnnotationValue>();
codeGenerator = new CodeGenerator(this);
}
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:7,代码来源:MethodBuilder.stab.cs
示例5: testConstructedGenericClass
public void testConstructedGenericClass() {
var typeSystem = new Library(new String[] { bin });
var typeInfo = typeSystem.getType("stab/bytecode/test/classes/GenericClass");
var args = new ArrayList<TypeInfo>();
args.add(typeSystem.getType("java/lang/String"));
doTest("ConstructedGenericClass", typeSystem.getGenericType(typeInfo, args));
}
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:7,代码来源:TypeSystemTest.stab.cs
示例6: signatures
private static ArrayList signatures([In] Class[] obj0, [In] Annotation[][] obj1)
{
ArrayList arrayList = new ArrayList();
for (int index = 0; index < obj0.Length; ++index)
arrayList.add((object) new ParameterSignature(obj0[index], obj1[index]));
return arrayList;
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:ParameterSignature.cs
示例7: BuildListView
void BuildListView(QStandardItemModel listModel, ListModel model)
{
listModel.setRowCount(model.GetItems().Count);
listModel.setColumnCount(6);
ArrayList list = new ArrayList();
list.add("Extension");
list.add("Color");
list.add("Description");
list.add("> Bytes");
list.add("% Bytes");
list.add("Files");
listModel.setHorizontalHeaderLabels(list);
int i = 0;
foreach (var item in model.GetItems())
{
com.trolltech.qt.core.QModelIndex index = listModel.index(i, 0);
listModel.setData(i, 0, item.Extension);
listModel.setData(i, 1, item.Color.ToString());
listModel.setData(i, 2, item.Description);
listModel.setData(i, 3, ListModel.FormatSizeString(item.Bytes));
listModel.setData(i, 4, string.Format("{0:P1}", (item.PercentBytes)));
listModel.setData(i, 5, item.FileCount.ToString());
i++;
}
}
开发者ID:joncham,项目名称:NDirStat,代码行数:26,代码来源:MainWindow.cs
示例8: readWatchableObjects
public static List readWatchableObjects(DataInputStream datainputstream)
{
ArrayList arraylist = null;
for (byte byte0 = datainputstream.readByte(); byte0 != 127; byte0 = datainputstream.readByte())
{
if (arraylist == null)
{
arraylist = new ArrayList();
}
int i = (byte0 & 0xe0) >> 5;
int j = byte0 & 0x1f;
WatchableObject watchableobject = null;
switch (i)
{
case 0: // '\0'
watchableobject = new WatchableObject(i, j, Byte.valueOf(datainputstream.readByte()));
break;
case 1: // '\001'
watchableobject = new WatchableObject(i, j, Short.valueOf(datainputstream.readShort()));
break;
case 2: // '\002'
watchableobject = new WatchableObject(i, j, Integer.valueOf(datainputstream.readInt()));
break;
case 3: // '\003'
watchableobject = new WatchableObject(i, j, Float.valueOf(datainputstream.readFloat()));
break;
case 4: // '\004'
watchableobject = new WatchableObject(i, j, datainputstream.readUTF());
break;
case 5: // '\005'
short word0 = datainputstream.readShort();
byte byte1 = datainputstream.readByte();
short word1 = datainputstream.readShort();
watchableobject = new WatchableObject(i, j, new ItemStack(word0, byte1, word1));
// fall through (not.. c#..)
int k2 = datainputstream.readInt();
int l2 = datainputstream.readInt();
int i12 = datainputstream.readInt();
watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k2, l2, i12));
break;
case 6: // '\006'
int k = datainputstream.readInt();
int l = datainputstream.readInt();
int i1 = datainputstream.readInt();
watchableobject = new WatchableObject(i, j, new ChunkCoordinates(k, l, i1));
break;
}
arraylist.add(watchableobject);
}
return arraylist;
}
开发者ID:riverar,项目名称:Crafty,代码行数:60,代码来源:DataWatcher.cs
示例9: KeyedComboBoxModel
public KeyedComboBoxModel()
{
base.\u002Ector();
KeyedComboBoxModel keyedComboBoxModel = this;
this.data = new ArrayList();
this.listdatalistener = new ArrayList();
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:7,代码来源:KeyedComboBoxModel.cs
示例10: DefaultKeyedValues
public DefaultKeyedValues()
{
base.\u002Ector();
DefaultKeyedValues defaultKeyedValues = this;
this.keys = new ArrayList();
this.values = new ArrayList();
this.indexMap = new HashMap();
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:DefaultKeyedValues.cs
示例11: CodeGenerator
CodeGenerator(MethodBuilder method) {
this.instructions = new ArrayList<Instruction>();
this.method = method;
this.scopes = new ArrayList<ScopeInfo>();
this.locals = new ArrayList<LocalInfo>();
this.exceptionTable = new ArrayList<ExceptionHandler>();
this.lineNumbers = new ArrayList<LineNumberInfo>();
}
开发者ID:nagyistoce,项目名称:cnatural-language,代码行数:8,代码来源:CodeGenerator.stab.cs
示例12: CanSetAlertHandler
public void CanSetAlertHandler()
{
var webClient = new WebClient(BrowserVersion.FIREFOX_38);
List collectedAlerts = new ArrayList();
var alertHandler = new CollectingAlertHandler(collectedAlerts);
webClient.AlertHandler = alertHandler;
}
开发者ID:HtmlUnit,项目名称:NHtmlUnit,代码行数:8,代码来源:WebClientTests.cs
示例13: Description
private Description(string _param1, params Annotation[] _param2)
{
base.\u002Ector();
Description description = this;
this.fChildren = new ArrayList();
this.fDisplayName = param0;
this.fAnnotations = param1;
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:8,代码来源:Description.cs
示例14: LWSubsystem
public LWSubsystem()
: base(true)
{
LWSubsystem lwSubsystem = this;
this.preferredSize = new Dimension(100, 100);
this.selected = (Widget) null;
this.widgets = new ArrayList(20);
MainPanel.getPanel("LiveWindow").addSubsystem(this);
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:LWSubsystem.cs
示例15: Parameterized
public Parameterized(Class klass)
: base(klass, Collections.emptyList())
{
Parameterized parameterized = this;
this.runners = new ArrayList();
List parametersList = this.getParametersList(this.getTestClass());
for (int index = 0; index < parametersList.size(); ++index)
this.runners.add((object) new Parameterized.TestClassRunnerForParameters(this, this.getTestClass().getJavaClass(), parametersList, index));
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:9,代码来源:Parameterized.cs
示例16: clear
public override void clear () {
List names = new ArrayList ();
for (Enumeration e = getAttributeNames (); e.hasMoreElements (); ) {
names.add (e.nextElement ());
}
for (Iterator it = names.iterator (); it.hasNext (); ) {
removeAttribute ((String) it.next ());
}
}
开发者ID:KonajuGames,项目名称:SharpLang,代码行数:10,代码来源:AbstractAttributeMap.cs
示例17: validate
private void validate()
{
ArrayList arrayList1 = new ArrayList();
this.collectInitializationErrors((List) arrayList1);
if (((List) arrayList1).isEmpty())
return;
ArrayList arrayList2 = arrayList1;
Throwable.__\u003CsuppressFillInStackTrace\u003E();
throw new InitializationError((List) arrayList2);
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:10,代码来源:ParentRunner.cs
示例18: sort
public static void sort(List modules)
{
HashMap hashMap = new HashMap();
ArrayList arrayList1 = new ArrayList();
ArrayList arrayList2 = new ArrayList();
for (int index = 0; index < modules.size(); ++index)
{
PackageState packageState = (PackageState) modules.get(index);
if (packageState.getState() == -2)
{
arrayList1.add((object) packageState);
}
else
{
PackageSorter.SortModule sortModule = new PackageSorter.SortModule(packageState);
arrayList2.add((object) sortModule);
hashMap.put((object) packageState.getModule().getModuleClass(), (object) sortModule);
}
}
PackageSorter.SortModule[] sortModuleArray = (PackageSorter.SortModule[]) arrayList2.toArray((object[]) new PackageSorter.SortModule[arrayList2.size()]);
for (int index = 0; index < sortModuleArray.Length; ++index)
{
PackageSorter.SortModule sortModule = sortModuleArray[index];
sortModule.setDependSubsystems(PackageSorter.collectSubsystemModules(sortModule.getState().getModule(), hashMap));
}
int num1 = 1;
label_10:
while (num1 != 0)
{
num1 = 0;
int index = 0;
while (true)
{
if (index < sortModuleArray.Length)
{
PackageSorter.SortModule sortModule = sortModuleArray[index];
int num2 = PackageSorter.searchModulePosition(sortModule, hashMap);
if (num2 != sortModule.getPosition())
{
sortModule.setPosition(num2);
num1 = 1;
}
++index;
}
else
goto label_10;
}
}
Arrays.sort((object[]) sortModuleArray);
modules.clear();
for (int index = 0; index < sortModuleArray.Length; ++index)
modules.add((object) sortModuleArray[index].getState());
for (int index = 0; index < arrayList1.size(); ++index)
modules.add(arrayList1.get(index));
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:55,代码来源:PackageSorter.cs
示例19: removeCodeBase
public static void removeCodeBase(URL codeBase, URLClassLoader urlClassLoader)
{
ArrayList arrayList = new ArrayList();
URL[] urLs = urlClassLoader.getURLs();
for (int index = 0; index < urLs.Length; ++index)
{
if (!urLs[index].sameFile(codeBase))
((List) arrayList).add((object) urLs[index]);
}
ResourceBundleWrapper.noCodeBaseClassLoader = URLClassLoader.newInstance((URL[]) ((List) arrayList).toArray((object[]) new URL[0]));
}
开发者ID:NALSS,项目名称:SmartDashboard.NET,代码行数:11,代码来源:ResourceBundleWrapper.cs
示例20: onCraftGuiOpened
public virtual void onCraftGuiOpened(ICrafting icrafting)
{
crafters.add(icrafting);
var arraylist = new ArrayList();
for (int i = 0; i < inventorySlots.size(); i++)
{
arraylist.add(((Slot) inventorySlots.get(i)).getStack());
}
icrafting.updateCraftingInventory(this, arraylist);
updateCraftingMatrix();
}
开发者ID:riverar,项目名称:Crafty,代码行数:12,代码来源:CraftingInventoryCB.cs
注:本文中的java.util.ArrayList类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论