public boolean isEntity(){
  return isString() && string.startsWith("&#") && string.endsWith(";");
}

public boolean isEntity ( ) { return isString ( ) && string . startsWith ( "&#" ) && string . endsWith ( ";" ) ; }
checks if the content is an entity . it should be an string an be in the form " & # { number } ; " .
