如何跨Java类共享通用代码

我有那些Java类:

public class Item {
    String name;
    int price;
    int weight;

    public Item(String name, int price, int weight) {
        this.name = name;
        this.price = price;
        this.weight = weight;
    }
}
public class Sword extends Item {
    int damage;
    int speed;

    public Sword(String name, int price, int weight, int damage, int speed) {
        super(name, price, weight);
        this.damage = damage;
        this.speed = speed;
    }
}
public class HasDurability {
    int current_durability;
    int max_durability;

    public HasDurability(int durability) {
        this.max_durability = durability;
        this.current_durability = durability;
    }

    public void damage(int damage) {
        current_durability -= damage;
    }
}

我想与Sword共享HasDurability类中的代码,而不与Item共享。

编辑:另外,我想与Armor之类的其他类共享HasDurability。

我只能上一堂课。如何从Item和HasDurability到Sword类共享代码?