mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-02 10:24:11 +01:00
Add isMetadata() instead of testing whether dynamic cast fails
This commit is contained in:
parent
b81450a4aa
commit
157e561927
@ -24,6 +24,7 @@ public abstract class UAVDataObject extends UAVObject {
|
|||||||
super.initialize(instID);
|
super.initialize(instID);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isMetadata() { return true; };
|
||||||
/**
|
/**
|
||||||
* Assign a metaobject
|
* Assign a metaobject
|
||||||
*/
|
*/
|
||||||
|
@ -67,6 +67,11 @@ public class UAVMetaObject extends UAVObject {
|
|||||||
parentMetadata = parent.getDefaultMetadata();
|
parentMetadata = parent.getDefaultMetadata();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isMetadata() {
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the parent object
|
* Get the parent object
|
||||||
*/
|
*/
|
||||||
|
@ -46,6 +46,7 @@ public abstract class UAVObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public abstract boolean isMetadata();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object update mode
|
* Object update mode
|
||||||
|
Loading…
Reference in New Issue
Block a user