diff options
author | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 17:02:26 -0500 |
---|---|---|
committer | Henigan <rheniga1@MGC12Z921DLVCG.fbpld77.ford.com> | 2020-12-09 17:02:26 -0500 |
commit | 7939eec07e5c52a873cc7e2f8a54a68c227354d4 (patch) | |
tree | 68e681adc4ee10416518e259091d4e8e28a71f0e | |
parent | 931505ca855a057fec8b932fe387865b155ba755 (diff) | |
download | sdl_android-feature/issue_116_RPC_Struct.tar.gz |
add override methods for missed rpc structsfeature/issue_116_RPC_Struct
14 files changed, 333 insertions, 0 deletions
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java index 23a198b0c..752df29ff 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/ClimateControlCapabilities.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.smartdevicelink.proxy.RPCStruct; import com.smartdevicelink.proxy.rpc.enums.DefrostZone; @@ -472,4 +473,26 @@ public class ClimateControlCapabilities extends RPCStruct { public Boolean getClimateEnableAvailable() { return getBoolean(KEY_CLIMATE_ENABLE_AVAILABLE); } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of ClimateControlCapabilities, not the same + if (!(obj instanceof ClimateControlCapabilities)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/CloudAppProperties.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/CloudAppProperties.java index ce959b1bc..da271e2ea 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/CloudAppProperties.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/CloudAppProperties.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc; import androidx.annotation.NonNull; +import androidx.annotation.Nullable; import com.smartdevicelink.proxy.RPCStruct; import com.smartdevicelink.proxy.rpc.enums.HybridAppPreference; @@ -142,4 +143,25 @@ public class CloudAppProperties extends RPCStruct { return getString(KEY_ENDPOINT); } + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of CloudAppProperties, not the same + if (!(obj instanceof CloudAppProperties)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/FuelRange.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/FuelRange.java index 53c768baf..1c8f704a9 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/FuelRange.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/FuelRange.java @@ -31,6 +31,9 @@ */ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import com.smartdevicelink.proxy.rpc.enums.CapacityUnit; import com.smartdevicelink.proxy.rpc.enums.ComponentVolumeStatus; @@ -258,4 +261,26 @@ public class FuelRange extends RPCStruct { public CapacityUnit getCapacityUnit() { return (CapacityUnit) getObject(CapacityUnit.class, KEY_CAPACITY_UNIT); } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of FuelRange, not the same + if (!(obj instanceof FuelRange)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java index 63be6aef0..666e12310 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/HMICapabilities.java @@ -31,6 +31,9 @@ */ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import java.util.Hashtable; @@ -193,4 +196,26 @@ public class HMICapabilities extends RPCStruct { } return (Boolean) available; } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of HMICapabilities, not the same + if (!(obj instanceof HMICapabilities)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java index a7a79fa1b..ce21f6850 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/ImageField.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.FileType;
@@ -131,4 +132,26 @@ public class ImageField extends RPCStruct { setValue(KEY_IMAGE_RESOLUTION, imageResolution);
return this;
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of ImageField, not the same
+ if (!(obj instanceof ImageField)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/NavigationCapability.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/NavigationCapability.java index 8c7fe0c55..95b72a22e 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/NavigationCapability.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/NavigationCapability.java @@ -31,6 +31,9 @@ */ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import java.util.Hashtable; @@ -66,4 +69,26 @@ public class NavigationCapability extends RPCStruct { setValue(KEY_GETWAYPOINTS_ENABLED, getWayPointsEnabled); return this; } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of NavigationCapability, not the same + if (!(obj instanceof NavigationCapability)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java index cd563bc64..176673b4f 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/ParameterPermissions.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
@@ -146,4 +147,26 @@ public class ParameterPermissions extends RPCStruct { setValue(KEY_USER_DISALLOWED, userDisallowed);
return this;
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of ParameterPermissions, not the same
+ if (!(obj instanceof ParameterPermissions)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java index d7d902c5c..3d35ccdcd 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/PermissionItem.java @@ -33,6 +33,7 @@ package com.smartdevicelink.proxy.rpc; import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
@@ -157,4 +158,26 @@ public class PermissionItem extends RPCStruct { setValue(KEY_REQUIRE_ENCRYPTION, isRequired);
return this;
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of PermissionItem, not the same
+ if (!(obj instanceof PermissionItem)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java index aac91a535..89bf31ce6 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/RemoteControlCapabilities.java @@ -31,6 +31,9 @@ */ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import java.util.Hashtable; @@ -193,4 +196,26 @@ public class RemoteControlCapabilities extends RPCStruct { public LightControlCapabilities getLightControlCapabilities() { return (LightControlCapabilities) getObject(LightControlCapabilities.class, KEY_LIGHT_CONTROL_CAPABILITIES); } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of RemoteControlCapabilities, not the same + if (!(obj instanceof RemoteControlCapabilities)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/SeatLocationCapability.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/SeatLocationCapability.java index 95179f78a..62a98424f 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/SeatLocationCapability.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/SeatLocationCapability.java @@ -1,6 +1,9 @@ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import java.util.Hashtable; @@ -106,4 +109,26 @@ public class SeatLocationCapability extends RPCStruct { public List<SeatLocation> getSeats() { return (List<SeatLocation>) getObject(SeatLocation.class, KEY_SEATS); } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of SeatLocationCapability, not the same + if (!(obj instanceof SeatLocationCapability)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java index e2cdd6be9..fa1ec0ef2 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/StartTime.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
@@ -178,4 +179,26 @@ public class StartTime extends RPCStruct { setValue(KEY_SECONDS, seconds);
return this;
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of StartTime, not the same
+ if (!(obj instanceof StartTime)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java index 4b0b8a94e..9f94663a3 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/TextField.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
import com.smartdevicelink.proxy.rpc.enums.CharacterSet;
@@ -219,4 +220,26 @@ public class TextField extends RPCStruct { setValue(KEY_ROWS, rows);
return this;
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of TextField, not the same
+ if (!(obj instanceof TextField)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java index c2e5ec216..ff33b8692 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/TouchEventCapabilities.java @@ -32,6 +32,7 @@ package com.smartdevicelink.proxy.rpc;
import androidx.annotation.NonNull;
+import androidx.annotation.Nullable;
import com.smartdevicelink.proxy.RPCStruct;
@@ -128,4 +129,26 @@ public class TouchEventCapabilities extends RPCStruct { public Boolean getDoublePressAvailable() {
return getBoolean(KEY_DOUBLE_PRESS_AVAILABLE);
}
+
+ @Override
+ public int hashCode() {
+ return super.hashCode();
+ }
+
+ @Override
+ public boolean equals(@Nullable Object obj) {
+ if (obj == null) return false;
+ // if this is the same memory address, it's the same
+ if (this == obj) return true;
+ // if this is not an instance of TouchEventCapabilities, not the same
+ if (!(obj instanceof TouchEventCapabilities)) return false;
+ // return comparison
+ return hashCode() == obj.hashCode();
+ }
+
+ @NonNull
+ @Override
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
}
diff --git a/base/src/main/java/com/smartdevicelink/proxy/rpc/VideoStreamingCapability.java b/base/src/main/java/com/smartdevicelink/proxy/rpc/VideoStreamingCapability.java index 88b18b802..e31d7372b 100644 --- a/base/src/main/java/com/smartdevicelink/proxy/rpc/VideoStreamingCapability.java +++ b/base/src/main/java/com/smartdevicelink/proxy/rpc/VideoStreamingCapability.java @@ -31,6 +31,9 @@ */ package com.smartdevicelink.proxy.rpc; +import androidx.annotation.NonNull; +import androidx.annotation.Nullable; + import com.smartdevicelink.proxy.RPCStruct; import com.smartdevicelink.util.SdlDataTypeConverter; @@ -180,4 +183,26 @@ public class VideoStreamingCapability extends RPCStruct { setValue(KEY_SCALE, scale); return this; } + + @Override + public int hashCode() { + return super.hashCode(); + } + + @Override + public boolean equals(@Nullable Object obj) { + if (obj == null) return false; + // if this is the same memory address, it's the same + if (this == obj) return true; + // if this is not an instance of VideoStreamingCapability, not the same + if (!(obj instanceof VideoStreamingCapability)) return false; + // return comparison + return hashCode() == obj.hashCode(); + } + + @NonNull + @Override + protected Object clone() throws CloneNotSupportedException { + return super.clone(); + } } |