The judge may be a fictionalised version of an infamous Chancery Judge who died in 1880. Sir Alexandra Cockburn, Baronet, Q.C. was famous for his affairs and his longterm relationship with Louisa Godfrey, by whom he had two children. They inherited his fortune, but not his title, when he died.
Cockburn was very political. He was elected to Parliament, where he spent the last five years of his life as the Lord Chief Justice of England, much to Queen Victoria's chagrin. She had refused him high honour on several occasions because she disapproved of his lifestyle.