@Test public void testIsValid() { assertTrue(pnrValid.isValid()); assertFalse(pnrNull.isValid()); assertFalse(pnrOne.isValid()); assertFalse(pnrTwo.isValid()); }
@Override public boolean isValid() { if (nullable && port == null) { return true; } return port != null && port > 0 && port <= 65535 ; }
PortNumberRule implements Rule { @Override public boolean isValid() { if (nullable && port == null) { return true; } return port != null && port > 0 && port <= 65535 ; } }
PortNumberRule implements Rule { @Override public boolean isValid() { if (nullable && port == null) { return true; } return port != null && port > 0 && port <= 65535 ; } PortNumberRule(final Integer thePort, final FaultType errorCode);  PortNumberRule(final Integer thePort, final FaultType errorCode, final boolean nullable); }
PortNumberRule implements Rule { @Override public boolean isValid() { if (nullable && port == null) { return true; } return port != null && port > 0 && port <= 65535 ; } PortNumberRule(final Integer thePort, final FaultType errorCode);  PortNumberRule(final Integer thePort, final FaultType errorCode, final boolean nullable); @Override boolean isValid(); @Override void validate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString(); }
PortNumberRule implements Rule { @Override public boolean isValid() { if (nullable && port == null) { return true; } return port != null && port > 0 && port <= 65535 ; } PortNumberRule(final Integer thePort, final FaultType errorCode);  PortNumberRule(final Integer thePort, final FaultType errorCode, final boolean nullable); @Override boolean isValid(); @Override void validate(); @Override boolean equals(Object obj); @Override int hashCode(); @Override String toString();  }