@Test public void approveNull(){ VersionFilter filter = new VersionFilter("1.0.0"); assertFalse(filter.filter(null)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return version.equals( ((DbModule)datamodelObj).getVersion()); } if(datamodelObj instanceof DbArtifact){ return version.equals( ((DbArtifact)datamodelObj).getVersion()); } return false; }
VersionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return version.equals( ((DbModule)datamodelObj).getVersion()); } if(datamodelObj instanceof DbArtifact){ return version.equals( ((DbArtifact)datamodelObj).getVersion()); } return false; } }
VersionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return version.equals( ((DbModule)datamodelObj).getVersion()); } if(datamodelObj instanceof DbArtifact){ return version.equals( ((DbArtifact)datamodelObj).getVersion()); } return false; } VersionFilter(final String version); }
VersionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return version.equals( ((DbModule)datamodelObj).getVersion()); } if(datamodelObj instanceof DbArtifact){ return version.equals( ((DbArtifact)datamodelObj).getVersion()); } return false; } VersionFilter(final String version); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); }
VersionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return version.equals( ((DbModule)datamodelObj).getVersion()); } if(datamodelObj instanceof DbArtifact){ return version.equals( ((DbArtifact)datamodelObj).getVersion()); } return false; } VersionFilter(final String version); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields();  }