Package net.solarnetwork.ocpp.domain
Class ChargePointConnectorKey
java.lang.Object
net.solarnetwork.ocpp.domain.ChargePointConnectorKey
- All Implemented Interfaces:
Serializable,Cloneable,Comparable<ChargePointConnectorKey>
public class ChargePointConnectorKey
extends Object
implements Serializable, Cloneable, Comparable<ChargePointConnectorKey>
A primary key for a Charge Point connector.
- Version:
- 1.0
- Author:
- matt
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intbooleanlongGet the Charge Point ID.intGet the connector ID.inthashCode()static ChargePointConnectorKeykeyFor(long chargePointId, int connectorId) Create a new key instance.toString()
-
Constructor Details
-
ChargePointConnectorKey
public ChargePointConnectorKey(long chargePointId, int connectorId) Constructor.- Parameters:
chargePointId- the Charge Point IDconnectorId- the connector ID- Throws:
IllegalArgumentException- ifchargePointIdis null
-
-
Method Details
-
keyFor
Create a new key instance.- Parameters:
chargePointId- the Charge Point IDconnectorId- the connector ID- Returns:
- the new key
- Throws:
IllegalArgumentException- ifchargePointIdis null
-
compareTo
- Specified by:
compareToin interfaceComparable<ChargePointConnectorKey>
-
clone
-
hashCode
public int hashCode() -
equals
-
toString
-
getChargePointId
public long getChargePointId()Get the Charge Point ID.- Returns:
- the chargePointId the Charge Point ID, never null
-
getConnectorId
public int getConnectorId()Get the connector ID.- Returns:
- the connector ID
-