本文整理汇总了C#中java.util.ArrayList类的典型用法代码示例。如果您正苦于以下问题:C# ArrayList类的具体用法?C# ArrayList怎么用?C# ArrayList使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ArrayList类属于java.util命名空间,在下文中一共展示了ArrayList类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DowngradeActionMap
public DowngradeActionMap()
{
base.\u002Ector();
DowngradeActionMap downgradeActionMap = this;
this.actionMap = new HashMap();
this.actionList = new ArrayList();
}
示例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);
}
示例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);
}
示例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);
}
示例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));
}
示例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;
}
示例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++;
}
}
示例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;
}
示例9: KeyedComboBoxModel
public KeyedComboBoxModel()
{
base.\u002Ector();
KeyedComboBoxModel keyedComboBoxModel = this;
this.data = new ArrayList();
this.listdatalistener = new ArrayList();
}
示例10: DefaultKeyedValues
public DefaultKeyedValues()
{
base.\u002Ector();
DefaultKeyedValues defaultKeyedValues = this;
this.keys = new ArrayList();
this.values = new ArrayList();
this.indexMap = new HashMap();
}
示例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>();
}
示例12: CanSetAlertHandler
public void CanSetAlertHandler()
{
var webClient = new WebClient(BrowserVersion.FIREFOX_38);
List collectedAlerts = new ArrayList();
var alertHandler = new CollectingAlertHandler(collectedAlerts);
webClient.AlertHandler = alertHandler;
}
示例13: Description
private Description(string _param1, params Annotation[] _param2)
{
base.\u002Ector();
Description description = this;
this.fChildren = new ArrayList();
this.fDisplayName = param0;
this.fAnnotations = param1;
}
示例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);
}
示例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));
}