Coverage Report - eu.simuline.octave.io.impl.MatrixWriter
 
Classes in this File Line Coverage Branch Coverage Complexity
MatrixWriter
100%
4/4
N/A
1
 
 1  
 /*
 2  
  * Copyright 2008 Ange Optimization ApS
 3  
  *
 4  
  * Licensed under the Apache License, Version 2.0 (the "License");
 5  
  * you may not use this file except in compliance with the License.
 6  
  * You may obtain a copy of the License at
 7  
  *
 8  
  *     http://www.apache.org/licenses/LICENSE-2.0
 9  
  *
 10  
  * Unless required by applicable law or agreed to in writing, software
 11  
  * distributed under the License is distributed on an "AS IS" BASIS,
 12  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13  
  * See the License for the specific language governing permissions and
 14  
  * limitations under the License.
 15  
  */
 16  
 /**
 17  
  * @author Kim Hansen
 18  
  */
 19  
 package eu.simuline.octave.io.impl;
 20  
 
 21  
 import eu.simuline.octave.type.OctaveDouble;
 22  
 
 23  
 import java.io.Writer;
 24  
 
 25  
 /**
 26  
  * The writer for the octave types 
 27  
  * "matrix" (of double) and "scalar" (of double) 
 28  
  * writing an {@link OctaveDouble} to a {@link Writer}. 
 29  
  */
 30  2
 public final class MatrixWriter 
 31  
     extends AbstractLogicalFloatingPointWriter<OctaveDouble> {
 32  
 
 33  
     @Override
 34  
     public Class<OctaveDouble> javaType() {
 35  2
         return OctaveDouble.class;
 36  
     }
 37  
 
 38  
     @Override
 39  
     protected String octaveMatrixType() {
 40  332
         return "matrix";
 41  
     }
 42  
 
 43  
     @Override
 44  
     protected String octaveScalarType() {
 45  90
         return "scalar";
 46  
     }
 47  
 }