public SingleVersion getSingleVersion() { return specs.size() != 1 ? null : specs.get( 0 ) .getSingleVersion(); }
@Override public boolean contains( final VersionSpec version ) { if ( version.isSingle() ) { final SingleVersion sv = version.getSingleVersion(); if ( !getBaseVersion().equals( sv.getBaseVersion() ) ) { // if my base version doesn't match the other's base version, there's no way I can contain it. return false; } if ( isLocalSnapshot() ) { // if I'm a local snapshot, then I can contain any other single snapshot. return version.isSnapshot(); } else if ( sv.isLocalSnapshot() ) { // either I'm a release or a timestamped snapshot. // if the other one is a local snapshot, I DON'T contain it. return false; } return true; } return false; }