Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
8
Task/Abstract-type/ActionScript/abstract-type-1.as
Normal file
8
Task/Abstract-type/ActionScript/abstract-type-1.as
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
package
|
||||
{
|
||||
public interface IInterface
|
||||
{
|
||||
function method1():void;
|
||||
function method2(arg1:Array, arg2:Boolean):uint;
|
||||
}
|
||||
}
|
||||
22
Task/Abstract-type/ActionScript/abstract-type-2.as
Normal file
22
Task/Abstract-type/ActionScript/abstract-type-2.as
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
package {
|
||||
import flash.utils.getQualifiedClassName;
|
||||
|
||||
public class AbstractClass {
|
||||
|
||||
private static const FULLY_QUALIFIED_NAME:String = "AbstractClass";
|
||||
|
||||
// For classes in a package, the fully qualified name should be in the form "package.name::class_name"
|
||||
// Note that a double colon and not a dot is used before the class name. This is the format returned
|
||||
// by the getQualifiedClassName() function.
|
||||
|
||||
public function AbstractClass() {
|
||||
if ( getQualifiedClassName(this) == FULLY_QUALIFIED_NAME )
|
||||
throw new Error("Class " + FULLY_QUALIFIED_NAME + " is abstract.");
|
||||
}
|
||||
|
||||
public function abstractMethod(a:int, b:int):void {
|
||||
throw new Error("abstractMethod is not implemented.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
10
Task/Abstract-type/ActionScript/abstract-type-3.as
Normal file
10
Task/Abstract-type/ActionScript/abstract-type-3.as
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
package {
|
||||
|
||||
public class Example extends AbstractClass {
|
||||
|
||||
override public function abstractMethod(a:int, b:int):void {
|
||||
trace(a + b);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue