EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.openstack.swift.domain.internal]

COVERAGE SUMMARY FOR SOURCE FILE [DelegatingMutableObjectInfoWithMetadata.java]

nameclass, %method, %block, %line, %
DelegatingMutableObjectInfoWithMetadata.java100% (1/1)65%  (15/23)65%  (68/105)63%  (22/35)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class DelegatingMutableObjectInfoWithMetadata100% (1/1)65%  (15/23)65%  (68/105)63%  (22/35)
compareTo (ObjectInfo): int 0%   (0/1)0%   (0/5)0%   (0/1)
getDelegate (): MutableObjectInfoWithMetadata 0%   (0/1)0%   (0/3)0%   (0/1)
hashCode (): int 0%   (0/1)0%   (0/4)0%   (0/1)
setBytes (Long): void 0%   (0/1)0%   (0/5)0%   (0/2)
setContainer (String): void 0%   (0/1)0%   (0/5)0%   (0/2)
setHash (byte []): void 0%   (0/1)0%   (0/5)0%   (0/2)
setLastModified (Date): void 0%   (0/1)0%   (0/5)0%   (0/2)
setUri (URI): void 0%   (0/1)0%   (0/5)0%   (0/2)
DelegatingMutableObjectInfoWithMetadata (MutableObjectInfoWithMetadata): void 100% (1/1)100% (6/6)100% (3/3)
getBytes (): Long 100% (1/1)100% (4/4)100% (1/1)
getContainer (): String 100% (1/1)100% (4/4)100% (1/1)
getContentLength (): Long 100% (1/1)100% (4/4)100% (1/1)
getContentMD5 (): byte [] 100% (1/1)100% (4/4)100% (1/1)
getContentType (): String 100% (1/1)100% (4/4)100% (1/1)
getHash (): byte [] 100% (1/1)100% (4/4)100% (1/1)
getLastModified (): Date 100% (1/1)100% (4/4)100% (1/1)
getMetadata (): Map 100% (1/1)100% (4/4)100% (1/1)
getName (): String 100% (1/1)100% (4/4)100% (1/1)
getUri (): URI 100% (1/1)100% (4/4)100% (1/1)
setContentLength (Long): void 100% (1/1)100% (7/7)100% (3/3)
setContentMD5 (byte []): void 100% (1/1)100% (5/5)100% (2/2)
setContentType (String): void 100% (1/1)100% (5/5)100% (2/2)
setName (String): void 100% (1/1)100% (5/5)100% (2/2)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.openstack.swift.domain.internal;
20 
21import java.net.URI;
22import java.util.Date;
23import java.util.Map;
24 
25import org.jclouds.io.payloads.BaseMutableContentMetadata;
26import org.jclouds.openstack.swift.domain.MutableObjectInfoWithMetadata;
27import org.jclouds.openstack.swift.domain.ObjectInfo;
28 
29/**
30 * 
31 * @author Adrian Cole
32 * 
33 */
34public class DelegatingMutableObjectInfoWithMetadata extends BaseMutableContentMetadata implements
35         MutableObjectInfoWithMetadata {
36   /** The serialVersionUID */
37   private static final long serialVersionUID = 5280642704532078500L;
38   private final MutableObjectInfoWithMetadata delegate;
39 
40   public DelegatingMutableObjectInfoWithMetadata(MutableObjectInfoWithMetadata delegate) {
41      this.delegate = delegate;
42   }
43 
44   @Override
45   public Long getContentLength() {
46      return delegate.getBytes();
47   }
48 
49   @Override
50   public String getContentType() {
51      return delegate.getContentType();
52   }
53 
54   @Override
55   public byte[] getContentMD5() {
56      return delegate.getHash();
57   }
58 
59   @Override
60   public int hashCode() {
61      return delegate.hashCode();
62   }
63 
64   @Override
65   public void setContentLength(Long bytes) {
66      if (bytes != null)
67         delegate.setBytes(bytes);
68   }
69 
70   @Override
71   public void setContentType(String contentType) {
72      delegate.setContentType(contentType);
73   }
74 
75   @Override
76   public void setContentMD5(byte[] hash) {
77      delegate.setHash(hash);
78   }
79 
80   public MutableObjectInfoWithMetadata getDelegate() {
81      return delegate;
82   }
83 
84   @Override
85   public Map<String, String> getMetadata() {
86      return delegate.getMetadata();
87   }
88 
89   @Override
90   public void setBytes(Long bytes) {
91      delegate.setBytes(bytes);
92   }
93 
94   @Override
95   public void setHash(byte[] hash) {
96      delegate.setHash(hash);
97   }
98 
99   @Override
100   public void setLastModified(Date lastModified) {
101      delegate.setLastModified(lastModified);
102   }
103 
104   @Override
105   public void setName(String name) {
106      delegate.setName(name);
107   }
108 
109   @Override
110   public Long getBytes() {
111      return delegate.getBytes();
112   }
113 
114   @Override
115   public byte[] getHash() {
116      return delegate.getHash();
117   }
118 
119   @Override
120   public Date getLastModified() {
121      return delegate.getLastModified();
122   }
123 
124   @Override
125   public String getName() {
126      return delegate.getName();
127   }
128 
129   @Override
130   public int compareTo(ObjectInfo o) {
131      return delegate.compareTo(o);
132   }
133 
134   @Override
135   public void setContainer(String container) {
136      delegate.setContainer(container);
137   }
138 
139   @Override
140   public String getContainer() {
141      return delegate.getContainer();
142   }
143 
144   @Override
145   public void setUri(URI uri) {
146      delegate.setUri(uri);
147   }
148 
149   @Override
150   public URI getUri() {
151      return delegate.getUri();
152   }
153}

[all classes][org.jclouds.openstack.swift.domain.internal]
EMMA 2.0.5312 (C) Vladimir Roubtsov