FileDocCategorySizeDatePackage
ModificationResult.javaAPI DocJaudiotagger 2.0.42764Wed Mar 30 16:11:50 BST 2011org.jaudiotagger.audio.asf.io

ModificationResult

public final class ModificationResult extends Object
Structure to tell the differences occurred by altering a chunk.
author
Christian Laireiter

Fields Summary
private final long
byteDifference
Stores the difference of bytes.
private final int
chunkDifference
Stores the difference of the amount of chunks.
"-1" if the chunk disappeared upon modification.
"0" if the chunk was just modified.
"1" if a chunk has been created.
private final Set
occuredGUIDs
Stores all GUIDs, which have been read.
Constructors Summary
public ModificationResult(int chunkCountDiff, long bytesDiffer, org.jaudiotagger.audio.asf.data.GUID occurred)
Creates an instance.

param
chunkCountDiff amount of chunks appeared, disappeared
param
bytesDiffer amount of bytes added or removed.
param
occurred all GUIDs which have been occurred, during processing


                                                                       
          
               
        assert occurred != null && occurred.length > 0;
        this.chunkDifference = chunkCountDiff;
        this.byteDifference = bytesDiffer;
        this.occuredGUIDs.addAll(Arrays.asList(occurred));
    
public ModificationResult(int chunkCountDiff, long bytesDiffer, Set occurred)
Creates an instance.

param
chunkCountDiff amount of chunks appeared, disappeared
param
bytesDiffer amount of bytes added or removed.
param
occurred all GUIDs which have been occurred, during processing

        this.chunkDifference = chunkCountDiff;
        this.byteDifference = bytesDiffer;
        this.occuredGUIDs.addAll(occurred);
    
Methods Summary
public longgetByteDifference()
Returns the difference of bytes.

return
the byte difference

        return this.byteDifference;
    
public intgetChunkCountDifference()
Returns the difference of the amount of chunks.

return
the chunk count difference

        return this.chunkDifference;
    
public java.util.SetgetOccuredGUIDs()
Returns all GUIDs which have been occurred during processing.

return
see description.s

        return new HashSet<GUID>(this.occuredGUIDs);