Example of a class implementing the

ENTERPRISE JAVA
Bridging the Gap Between Java Clients and EJBs Using XML

William Louth
Listing 4. Example of a class implementing the Name interface.


public class TrunkDetailsIconName implements Name {
  private String BEARER = "bearer";
  private String TRUNK = "trunk";
  public String get(Object obj) {
    TrunkDetails d = (TrunkDetails)obj;
    return ((d.isBearer()) ? BEARER : TRUNK);
  }
}

Featured

Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.