# Class Entity

java.lang.Object
org.snpeff.reactome.Entity

All Implemented Interfaces:
  `Comparable<Entity>`

Direct Known Subclasses:
  `Compartment, Event`

public class Entity extends Object implements Comparable<Entity>
A reactome basic entity (e.g. anything in reactome database derives fro this object)

Author:
  pcingola

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static enum`
`Entity.TransferFunction`

## Field Summary

Fields
Modifier and Type
Field
Description
`static double`
`BETA`
`protected Compartment`
`compartment`
`static boolean`
`debug`
`protected double`
`fixedOutput`
`protected HashSet<String>`
`geneIds`
`protected int`
`id`
`protected String`
`name`
`protected double`
`output`
`static Entity.TransferFunction`
`TRANSFER_FUNCTION`
`protected double`
`weight`

## Constructor Summary

Constructors
Constructor
Description
`Entity(int id, String name)`

## Method Summary

Modifier and Type
Method
Description
`void`
`addGeneId(String geneId)`
Add a geneId
`double`
`calc()`
`double`
`calc(HashSet<Entity> doneEntities)`
Calculate entities.
`int`
`compareTo(Entity e)`
`Compartment`
`getCompartment()`
`Collection<String>`
`getGeneIds()`
`int`
`getId()`
`String`
`getName()`
`double`
`getOutput()`
`double`
`getWeight()`
`boolean`
`hasOutput()`
`boolean`
`isFixed()`
`boolean`
`isReaction()`
`void`
`reset()`
`void`
`setCompartment(Compartment compartment)`
`void`
`setFixedOutput(double fixedOutput)`
`void`
`setWeight(double weight)`
`String`
`toString()`
`String`
`toString(int tabs, HashSet<Entity> done)`
`String`
`toStringSimple()`
`protected double`
`transferFunction(double x)`
Transfer function

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### debug

public static boolean debug

### TRANSFER_FUNCTION

public static Entity.TransferFunction TRANSFER_FUNCTION

### BETA

public static double BETA

### id

protected int id

### name

protected String name

### compartment

protected Compartment compartment

### output

protected double output

### weight

protected double weight

### fixedOutput

protected double fixedOutput

### geneIds

protected HashSet<String> geneIds

## Constructor Details

### Entity

public Entity(int id, String name)

## Method Details

### addGeneId

public void addGeneId(String geneId)
Add a geneId

Parameters:
  `geneId` -

### calc

public double calc()

### calc

public double calc(HashSet<Entity> doneEntities)
Calculate entities. Make sure we don't calculate twice (keep 'doneEntities' set up to date)

Parameters:
  `doneEntities` -
Returns:

### compareTo

public int compareTo(Entity e)

Specified by:
  `compareTo` in interface `Comparable<Entity>`

### getCompartment

public Compartment getCompartment()

### getGeneIds

public Collection<String> getGeneIds()

### getId

public int getId()

### getName

public String getName()

### getOutput

public double getOutput()

### getWeight

public double getWeight()

### hasOutput

public boolean hasOutput()

### isFixed

public boolean isFixed()

### isReaction

public boolean isReaction()

### reset

public void reset()

### setCompartment

public void setCompartment(Compartment compartment)

### setFixedOutput

public void setFixedOutput(double fixedOutput)

### setWeight

public void setWeight(double weight)

### toString

public String toString()

Overrides:
  `toString` in class `Object`

### toString

public String toString(int tabs, HashSet<Entity> done)

### toStringSimple

public String toStringSimple()

### transferFunction

protected double transferFunction(double x)
Transfer function

Parameters:
  `x` -
Returns: