【发布时间】:2015-09-03 11:41:29
【问题描述】:
我有一个 TestClass 对象的向量,我想根据每个 TestClass 对象的整数升序排列。我该怎么做?
主要方法:
public class testSave extends Sprite
{
public function testSave()
{
var testVector:Vector.<TestClass> = new Vector.<TestClass>;
testVector.push(new TestClass(5, "Testing"), new TestClass(2, "HelloWorld"), new TestClass(7, "Ohai");
}
}
测试类
public class TestClass
{
public function TestClass(testi:int, tests:String)
{
this.stest = tests;
this.itest = testi
}
public var stest:String;
public var itest:int;
}
【问题讨论】:
标签: class vector actionscript integer