Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## cz.pcland.knapsack
Class KnapSackItem

    java.lang.Object
      cz.pcland.knapsack.KnapSackItem

All Implemented Interfaces:
  java.lang.Comparable

    public class KnapSackItem

extends java.lang.Object
implements java.lang.Comparable

Constructor Summary
`KnapSackItem(double price, double capacity)`
`KnapSackItem(KnapSackItem ksi)`

Method Summary
`void` | `addToApproximate()`
`void` | `addToSack()`
`int` | `compareTo(java.lang.Object to)`
`double` | `getCapacity()`
`double` | `getPrice()`
`boolean` | `isInApproximate()`
`boolean` | `isInSack()`
`void` | `removeFromApproximate()`
`void` | `removeFromSack()`
`java.lang.String` | `toString()`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### KnapSackItem

    public KnapSackItem(double price,
                        double capacity)

### KnapSackItem

    public KnapSackItem(KnapSackItem ksi)

Method Detail

### compareTo

    public int compareTo(java.lang.Object to)

  Specified by:
    `compareTo` in interface `java.lang.Comparable`

### addToSack

    public void addToSack()

### removeFromSack

    public void removeFromSack()

### isInSack

    public boolean isInSack()

### addToApproximate

    public void addToApproximate()

### removeFromApproximate

    public void removeFromApproximate()

### isInApproximate

    public boolean isInApproximate()

### toString

    public java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getPrice

    public double getPrice()

### getCapacity

    public double getCapacity()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD