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