public class Charge extends ExperimentObject
Modifier and Type | Field and Description |
---|---|
static int |
MINUS
Static int to modele a negative charge.
|
static int |
NEUTRAL
Static int to modele a neutral component.
|
static int |
PLUS
Static int to modele a positive charge.
|
int |
sign
Sign of the charge according to the static fields.
|
int |
value
Value of the charge.
|
Constructor and Description |
---|
Charge(int sign,
int value)
Constructor for a charge.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getChargeAsFormattedString()
Returns the charge as a string of + or -.
|
int |
hashCode() |
java.lang.String |
toString()
Returns a string representing the charge.
|
addUrParam, getParameterKey, getUrParam
public static final int PLUS
public static final int MINUS
public static final int NEUTRAL
public int sign
public int value
public Charge(int sign, int value)
sign
- sign of the charge as specified in static fieldsvalue
- value of the chargepublic java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getChargeAsFormattedString()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2013. All Rights Reserved.