コード例 #1
0
 @Override
 public PathSegmentImpl clone() {
   try {
     PathSegmentImpl ps = (PathSegmentImpl) super.clone();
     if (matrixParams != null) {
       ps.matrixParams = ((MultivaluedMapImpl<String, String>) matrixParams).clone();
     }
     return ps;
   } catch (CloneNotSupportedException e) {
     // shouldn't happen
     throw new WebApplicationException(e);
   }
 }
コード例 #2
0
 public static PathSegmentImpl decode(PathSegment segment) {
   PathSegmentImpl clone = new PathSegmentImpl();
   clone.path = UriEncoder.decodeString(segment.getPath());
   clone.matrixParams = UriEncoder.decodeMultivaluedMap(segment.getMatrixParameters(), true);
   return clone;
 }